MySQL Forums
Forum List  »  Performance

Re: Index Not being used.
Posted by: Øystein Grøvlen
Date: May 27, 2016 12:45AM

Hi,

The optimizer may have determined that the records from 2015 is so large part of the table that it is more efficient to scan the table than to use an index.

You can try forcing the use of the index to see if that gives better performance:

... FROM pos_ord_headers FORCE INDEX(ORD_Date) ...

By the way, does not your query need a GROUP BY clause to be meaningful?

Øystein Grøvlen,
Senior Principal Software Engineer,
MySQL Group, Oracle,
Trondheim, Norway

Options: ReplyQuote


Subject
Views
Written By
Posted
984
May 26, 2016 02:29PM
507
May 26, 2016 03:53PM
Re: Index Not being used.
473
May 27, 2016 12:45AM
449
May 27, 2016 07:05AM
409
May 27, 2016 11:29PM
537
May 31, 2016 07:04AM
426
May 31, 2016 09:26PM
504
June 01, 2016 05:40AM
372
June 01, 2016 11:29AM
425
June 01, 2016 11:41AM
431
June 04, 2016 05:14PM
494
May 27, 2016 10:14AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.