Data Analysis, Data, Data Science, Sql, Python.
SQL can’t run fast: get the top 10 from 100 million rows of data. SELECT TOP 10 * FROM Orders ORDER BY Amount DESC As we can see that although this code is not complex, it has the keyword ORDER BY, which means doing a big sorting on all data first, and then taking the TOP 10. The big sorting is