E
E
Eugene2014-11-28 01:44:39
MySQL
Eugene, 2014-11-28 01:44:39

How much slower will the fetch be?

Good evening.
I ask for your help. How much slower will information be selected from the MySQL database if two fields of the INT type (WHERE A=23 AND B=13) participate in the selection, compared to a single field selection (WHERE ID=126).
The table from which this data will be selected contains one and a half billion rows. InnoDB.
PS is there a difference in the order of the query arguments ( WHERE A=23 AND B=13 or WHERE B=13 AND A=23) if there are much fewer records with B=13 than A=23?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2014-11-28
@Qwofer

Depends on which indexes are built for the table. It does not depend on the order, the server optimizes the execution of requests.

A
Alexander Aksentiev, 2014-11-28
@Sanasol

What is the question, take and make a request descriptor, and you will find out
AND more profiling

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question