how to force index usage with a small local dev database
Posted by:
Raf Mahn
Date: February 16, 2018 03:21AM
Is it possible to force mysql to use indexes for a small amount of data in the db? It is just for local development testing purposes. Can I change any parameter in mysql to force index usage?
BACKGROUND
I have created a java junit testing library that wraps all queries sent to the DB and verifies that all queries are using an index, if not then we can specify that that query doesn't use an index. But I do notice that the explain plan changes depending on the data in the table. So my tests randomly fail depending on mysql behaviour.
It is nice to get automated feedback from tests before the sql hits production. But given it randomly fails it may be more hassel than it is worth.
Subject
Views
Written By
Posted
how to force index usage with a small local dev database
829
February 16, 2018 03:21AM
374
February 16, 2018 09:12AM
461
February 18, 2018 04:26PM
376
February 18, 2018 07:17PM
390
February 19, 2018 03:11AM
404
February 19, 2018 03:47AM
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.