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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:19:14+00:00 2026-06-09T11:19:14+00:00

This is the following query that I have in my views.py: #parse json function

  • 0

This is the following query that I have in my views.py:

#parse json function
parse = get_persistent_graph(request)

#guys
male_pic = parse.fql('SELECT name,uid,education FROM user WHERE sex="male" AND uid IN (SELECT uid2 FROM friend WHERE uid1 = me())') 

This query currently takes approximately 10 seconds for me to load with about 800+ friends.

Is it possible to only query this once, update when needed and save to a variable to use instead of having to query every time the page is loaded/refreshed?

Some possible solutions that I can think of are:

  • Saving to the database – IMO that doesn’t seem easily scaleable if I save every query from every user of this application
  • Some function I have no knowledge of
  • Improved and more efficient query request

Could someone please guide me to the path gate with the most efficient direction? Hoping I can lower 10 second requests to < 1 second! Thanks!

  • 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-09T11:19:15+00:00Added an answer on June 9, 2026 at 11:19 am

    Use cache system for that (like memcache).

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

Sidebar

Related Questions

I have this following query for CodeIgniter: $q = $this->db->where('(message_from='.$user_id.' AND message_to='.$this->auth_model->userdata['user_id'].')') ->or_where('(message_from='.$this->auth_model->userdata['user_id'].' AND
I have this following IEnumerable LINQ query: var query = from p in Enumerable.Range(2,
i've been using the following query: select LEN(columnname) as columnmame from dbo.amu_datastaging This works,
I have the following query, now the strange thing is if I run this
I have this error message : SELECT failed because the following SET options have
I have the following query I use and it works great: SELECT * FROM
I'm using a SQL query that is similar to the following form: SELECT col1,
following background: i have a Table-valued Function that returns a Table that is a
I have the following LINQ query that selects all the pages that have a
Is there a reason why this query doesn't work? The following query will work

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.