A
A
Alexey2017-08-02 12:19:29
MySQL
Alexey, 2017-08-02 12:19:29

Why does this request take a long time to load and not load?

SELECT * FROM users_data, deleted, mails WHERE users_data.private='0' AND deleted.private='0' AND mails.private='0' ORDER BY users_data.time, deleted.time, mails.time ASC LIMIT 255290,10

How else can I sort by the time column, which is present in all tables and their structure is the same?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2017-08-02
@Rsa97

With this query, you select the Cartesian product of rows from three tables. If each of the tables has at least a thousand rows, then the result will be a billion. (1000 3 ).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question