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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:02:34+00:00 2026-05-19T22:02:34+00:00

A website I am making revolves around a search utility, and a want to

  • 0

A website I am making revolves around a search utility, and a want to have something on the homepage that lists the top 10 (or something) most searched queries of the day.

What would be the easiest / most efficient way of doing this?

Should I use a sql database, or just a text file containing the top 10 queries and a cronjob erasing the data every day?

Also, how would I avoid the problem of two users searching for something at the same and it only recording one of them, i.e multithreading?

The back-end of the site is all written in python

  • 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-19T22:02:35+00:00Added an answer on May 19, 2026 at 10:02 pm

    Put the queries in a table, with one row per distinct query, and a column to count. Insert if the query doesn’t exist already, or otherwise increment the query row counter.

    Put a cron job together than empties the table at 12 midnight. Use transactions to prevent two different requests from colliding.

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

Sidebar

Related Questions

I have a question about tables in MySQL. I'm currently making a website where
I'm making a website for a organization that also has a facebook group, and
i m thinking of making a website..and i want to keep a track on
i am thinking of making a website.. bt how can i make sure that
I was making a website for a music band, and i was wondering the
I am thinking about making a website with some fairly intense JavaScript/canvas usage and
Right now I'm making an extremely simple website- about 5 pages. Question is if
I'm making my way through the early Data Access Tutorials on Microsoft's ASP.NET website
I'm creating a website for my church and I'm having problems making it display
I am currently in the process of making a new ASP.net MVC website, and

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.