Answer the question
In order to leave comments, you need to log in
How to leave the base sort order of a table on a JOIN?
There is a table table1. There the main index is product_sort_id and there is a product_id column.
All products are sorted as needed and driven into this table so that the first product is product_sort_id=1, the second product is product_sort_id=2, and so on. The purpose of this venture is to remove sorting from a huge number of queries and speed up query processing.
The essence of the problem - if I do select, then everything normally displays the sorted data by the product_sort_id column.
If I do this SELECT LEFT JOIN table2 ON (table1.product_id=table2.product_id) then sorting is obtained by product_id.
How to make sorting by product_sort_id WITHOUT USING ORDER BY!!! ORDER BY eats at least 0.2 seconds for each request.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question