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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:24:37+00:00 2026-05-17T00:24:37+00:00

I’ve read in multiple locations that GAE lifted the 1000 record limit on queries

  • 0

I’ve read in multiple locations that GAE lifted the 1000 record limit on queries and counts, however, I can only seem to get a count of the records up to 1000. I won’t be pulling more than 1000 queries at a time, but the requirements are such that I need a count of the matching records.

I understand you can use cursors to “paginate” through the dataset, but to cycle through just to get a count seems a bit much. Presumably when they said they “lifted” the limit, it was the hard limit – you still need to cycle through the results 1000 at a time, am I correct?

Should I be using a method other than the .all()/filter method to generate 1000+ counts?

Thanks in advance for all your help!

  • 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-17T00:24:37+00:00Added an answer on May 17, 2026 at 12:24 am

    The behavior of Query.count() is inconsistent with the documentation when no limit is explicitly specified – the documentation indicates that it will count “until it finishes counting or times out.” GAE Issue 3671 reported this bug (about 3 weeks ago).

    The workaround: explicitly specify a limit and then that value will be used (rather than the default of 1,000).

    Testing on http://shell.appspot.com demonstrates this:

    # insert 1500 TestModel entites ...
    # ...
    >>> TestModel.all(keys_only=True).count()
    1000L
    >>> TestModel.all(keys_only=True).count(10000)
    1500L
    

    I also see the same behavior on the latest version of the development server (1.3.7) using this simple test app:

    from google.appengine.ext import webapp, db
    from google.appengine.ext.webapp.util import run_wsgi_app
    
    class Blah(db.Model): pass
    
    class MainPage(webapp.RequestHandler):
        def get(self):
            for i in xrange(3):
                db.put([Blah() for i in xrange(500)])  # can only put 500 at a time ...
            c = Blah.all().count()
            c10k = Blah.all().count(10000)
            self.response.out.write('%d %d' % (c,c10k))
            # prints "1000 1500" on its first run
    
    application = webapp.WSGIApplication([('/', MainPage)])
    
    def main(): run_wsgi_app(application)
    if __name__ == '__main__': main()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a jquery bug and I've been looking for hours now, I can't
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
Does anyone know how can I replace this 2 symbol below from the string
I need a function that will clean a strings' special characters. I do NOT

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.