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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T14:24:46+00:00 2026-05-14T14:24:46+00:00

I have an application for scheduling certain events. And all these events must be

  • 0

I have an application for scheduling certain events. And all these events must be reviewed after each scheduled time.

So basically we have 3 tables:

  • items(id, name)
  • scheduled_items(id, item_id, execute_at – datetime) – item_id column has an index option.
  • reviewed_items(id, item_id, created_at – datetime) – item_id column has an index option.

So core function of the application is “give me any items(which are not yet reviewed) for the actual moment”.

How can I optimize this solution for speed(because it is very core business feature and not micro optimization)?

I suppose that adding index to the datetime fields doesn’t make any sense because the cardinality or uniqueness on that fields are very high and index won’t give any(?) speed-up. Is it correct?

What would you recommend? Should I try no-SQL?

—

mysql -V
5.075

I use caching(memcached) where it makes sence.

updated.

  • 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-14T14:24:47+00:00Added an answer on May 14, 2026 at 2:24 pm

    I suppose that you actually want the items that are scheduled, but not reviewed after that scheduling?

    Shouldn’t the reviews be connected to the scheduled items instead of difrectly to the items? Now you have to compare the dates to see which reviews comes after one scheduled item but before the next. Also, if an item is scheduled twice with a short time between, you may end up with both reviews belonging to the second scheduling.

    With this change you could easily pick out the unreviewed schedulings:

    select i.id, i.name, s.execute_at
    from items i
    inner join scheduled_items s on s.item_id = i.id
    left join reviewed_items r on r.scheduled_items_id = s.id
    where r.id is null
    

    As to your question:

    I suppose that adding index to the
    datetime fields doesn’t make any sense
    because the cardinality or uniqueness
    on that fields are very high and index
    won’t give any(?) speed-up. Is it
    correct?

    No, that is not correct. An index can be useful if the cardinality is high. An index is created by default for the unique id of a table, which of course has the highest cardinality possible.

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

Sidebar

Related Questions

I have a question in scheduling jobs in web application. If we have to
I have Application settings stored under HKEY_LOCAL_MACHINE\SOFTWARE\MyCompany branch. Settings must be same for different
I'm using Quartz.NET for job scheduling in my ASP.NET application, and I have created
I am writing a Scheduling application, and each row in my Database Table is
I have a server with multiple Tomcat instances and each contains about 10 application
I have created a scheduling application that spans upwards of 16 weeks. I would
My application is basically a content based router which will route MMS events. The
I have application which needs to use a dll (also written by me) which
I have application that makes different queries with different results so the caching in
I have Application written with GWT 1.7. I have one page where I upload

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.