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 7066587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:05:58+00:00 2026-05-28T05:05:58+00:00

I am getting two different results while I would expect the result to be

  • 0

I am getting two different results while I would expect the result to be same no matter how I query the database. In the result of query 1, I am getting a list of value pairs like

NY 3

AL 6

WI 5

etc..

But when I run query 2 to test if my values are accurate or not.. and when I specifically run and get by state “NY”, I am getting a totally different number for NY. They are just not matching for any state. I am not sure any more as to which one is the accurate number.

Query 1:

//Edit
int countTheaters =  session.Query<Theaters>()
                        .Count();

var TheaterByStateList = session.Query<Theaters>()
                        .Take(countTheaters)
                        .ToList()
                        .GroupBy(x => x.State)
                        .OrderBy(x =>x.Count())
                        .ToDictionary(x => x.Key, x => x.Count());

Query 2:

int TheaterCountByState = session.Query<Theaters>()
                            .Where(x => x.State== "NY")
                            .Count();
  • 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-28T05:05:59+00:00Added an answer on May 28, 2026 at 5:05 am

    The reason for this is, that .Take() only returns the maximum number of records that have been set in the RavenDB server configuration. This is because ravens safe-by-design philosophy that should make you fail early (in development) and thus help you avoid a lot of pain that could happen if you weren’t aware of the means of not paging (something that people commonly run into with NHibernate or EF2).

    So by default, without specifiying anything else, you only get 128 records. You can change that on the client, but you will never get more records at once than the number that has been set on the server (1024 I think, but shouldn’t care anyway – there’s no reason why somebody would want to change these limits).

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

Sidebar

Related Questions

I am getting different results when I run the query with above clause but
If I run these two functions I am getting different result. The datetime.Now in
I am using predicates to refine search options and am getting two different results
I've never had this issue before, so I'm somewhat lost. I'm getting two different
Is two (or more) different threads allowed to write to the same memory location
i did it my way because i'm very bad getting results from two tables...
I've run into a problem where I'm getting two printouts of my /etc/motd file
MessageBox.Show((some_string.Length).ToString); I am getting two errors for this: The best overloaded method match for
Simple question - In c++, what's the neatest way of getting which of two
I'm getting the slope of a line bounded by two points float slopeXY(CGPoint p1,

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.