Table view: Column sort option on the UI should fetch the data from the database and display results accordingly
Problem Description: As the Row Limit in Table view is 10000, we get only 10000 records in the view. When we click on Sort ascending or Sort descending arrows in the UI, the data (only the visible 10000 rows) gets sorted whereas it is not considering the data available in the database.
Expectation: The sort options should fetch the data from the database again as per sort and display the Row Limit specified records.
Screenshot of Sort:

You could increase the limit to your needs,

I don't think is good idea to force to fetch the data every time that you sort a column. Superset does not know how much data the table/view has and in some cases it may really affect performance if you sort over trillions of rows, in addition is re-writting the SQL based on the changes not just in sort the data frame.
But this is my humble opinion, I worked with users with PB of data and in many cases they really froze the BI tools when they did select * or brought too much data to the interface. Some DBs could handle a good sort of trillions, but others are not as efficient or can not handle sorting of each column. Even if you have a LIMIT a SORT in the SQL force a full data scan.
I personally really like the efficiency of Superset dashboard because it works in aggregated cached values, this will force to connect to db each time.
Just my 2 cents. I am just thinking in my previous customers that have really big data sets and how this can impact them.
Thank you for your response. Understand your point but it is a customer requirement. Moreover they are expecting similar functionality like when a sort column is specified in the slice (GROUP BY or NOT GROUP BY section), there is an additional order by clause fired within the datasource query to fetch the data as per sort column selection.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.