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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:20:30+00:00 2026-05-26T08:20:30+00:00

I have a table with more than 300,000 rows (Total table size is 600mb+).

  • 0

I have a table with more than 300,000 rows (Total table size is 600mb+).

The rows on the table are records of events and each has a time stamp (epoch).

To perform a query on NOT expired events I have to use WHERE epoch > currentepoch, but it takes like 5-8 seconds to perform this kind of query. (In fact the number of NOT expired events are no more than 6,000)

So for a simple count of NOT expired events my query takes 5-8 seconds.

Is there any solutions to this? Can I query a part of the table? (Like ignoring the expired events and having MySQL not go trough them at all)

Note: Engine is MyISAM

Note2: I cannot normalize the table as the info are stuff like descriptions etc.

TLDR; Counting 6,000 rows out of a table of 300,000 rows takes 5-8 seconds, solutions?

Thanks

UPDATE: Thanks everyone. After adding an Index the query runs in less than half a second. Appreciate 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-26T08:20:31+00:00Added an answer on May 26, 2026 at 8:20 am

    there is a thing called index for this purpose

    CREATE INDEX epoch ON tablename (epoch)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table with more than 300,000 records, of size approximately 1.5 GB
I have a table with more than 10 000 000 rows. In TOAD this
I have a table with more than a millon rows. This table is used
I have a large table (more than 10 millions records). this table is heavily
I have a table with more than 9 rows. If I do this :
I have a MyISAM table with more than 10^7 rows. When adding data to
I have a table with a lot of records (could be more than 500
I have a table in sq server db having more than 1 million rows.
I have a Postgres table with more than 8 million rows. Given the following
I have oracle table that holds more than 30 million records, I need to

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.