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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:32:55+00:00 2026-06-10T08:32:55+00:00

I need to be able to search my users faster. A search without memcache

  • 0

I need to be able to search my users faster. A search without memcache takes 8 seconds. Now my code utilizes memcache with the help of Not Dot Net which reduces the search time to 4 sec. My question now is, how can I make it faster?

qUserSearch = Utilities.deserialize_entities(memcache.get("qUserSearch"))
if not qUserSearch:
    qUserSearch = db.GqlQuery("SELECT * FROM User ORDER BY created DESC").fetch(100000)
    memcache.add("qUserSearch", Utilities.serialize_entities(qUserSearch))

searchLength = len(searchData) 
hits = []
gotHits = False

for u in qUserSearch:
    searchEmail = u.email[0:searchLength]
    if searchEmail == searchData:
        hits.append( u.key() )
    else:
        # Since I only search for the first x chars
        # will there never be hits after it's had hits
        if gotHits:
            break 
return hits

My first ideas:

  • convert to ndb and SELECT only, needed, data FROM User
  • SQL way, create a table with less data. Just usernames and key to metadata
  • The new full text search
  • The old searchable models by 3rd party devs
  • Memcache only needed properties and traverese that instead of everything

Or do you have other ideas? Which once do you think I will save the most time on?

  • 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-06-10T08:32:57+00:00Added an answer on June 10, 2026 at 8:32 am

    You can also simulate the prefix search you are trying to accomplish with two inequality filters

    db.GqlQuery("SELECT * FROM User WHERE email >= :1 AND email <= :2", searchData, unicode(searchData) + u"\ufffd")
    

    Note: This answer was taken from the second answer provided for the question Google App Engine: Is it possible to do a Gql LIKE query?.

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

Sidebar

Related Questions

I need to be able to programatically expand users' search expressions such as: X
I need to implement a locality based search feature where users would be able
I need to search users in facebook by their email id's. I could not
I need to be able to search through multiple 2D arrays and search the
I need to be able to search within a string and find out if
I have a program that I need to be able to search a file
Users of the website need to able to store images in their area ,
I want users to be able to filter grid data without using the intrinsic
In a C# app, I would like users to be able to enter search
i want the users on my site to be able to search for other

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.