Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 737047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:40:32+00:00 2026-05-14T07:40:32+00:00

I am using ASPNET membership with 50000 records, and we have another table called

  • 0

I am using ASPNET membership with 50000 records, and we have another table called “scm_Users” which has exactly number of records, they are NOT linked by any key. I have a simple SQL:

select * from dbo.aspnet_Users a, dbo.scm_Users b
where a.UserName = b.UserName

I can get 50000 records in less than 1 second.

In LINQ, (using Entity Framework) when I am trying to do the same:

IEnumerable<MembershipUser> allMembershipUsers = Membership.GetAllUsers().Cast<MembershipUser>();
ObjectQuery<User> users = this.DataContext.UserSet;

var    result = (from a in allMembershipUsers
                      from b in users
                      where a.UserName == b.UserName
                 select new 
                 {
                   ..... 
                 }).AsEnumerable();

When I binded the result to Grid, it got timed out for 50000 records. When I debugged it and I moused over the “result view”, it got timed out too. Of course, if I use Membership.FindUsersByName() and limit the number of records, it will return the results peoperly.

And, if I bind 50000 records directly to the Grid without querying on Membership, Grid works too.

 var    result = (from b in users
                  select b).AsEnumerable();

What did I do wrong?

N.B.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T07:40:32+00:00Added an answer on May 14, 2026 at 7:40 am

    One significant difference is that you are streaming 100K records instead of 50K. The SQL query will combine the two results on the server and return the 50K rows of data joined between the two tables. In your example, you are pulling down the 50K via GetAllUsers and the other 50K via UserSet. The catch is that unless you query the aspnet Membership table directly via your DataContext, you will not be able to avoid this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the ASP.NET SQL Membership Provider. So, there's an aspnet_Users table that has
I am using asp.net membership and I have checked the table aspnet_membership and I
I have a question about aspnet_applications table I have created asp.net membership using .net
I am using the ASP.NET membership provider controls (ChangePassword and PasswordRecovery) and they generally
I have this membership site setup on my local machine using the ASP.NET membership
Does anyone have any examples of using Sqlite with ASP.NET membership? I am building
I'm using MySQL with ASPNET and Membership (including Entity Framework), also with autogenerateschema=true with
Using SQL Membership Provider for ASP.NET membership. I'm using first.last as the username, which
I have a simple create user wizard and custom membership provider which was taken
I'm using the SqlMembershipProvider and have a problem where aspnet_Membership_UpdateUserInfo is being called twice

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.