Can you think of a way I could make that clear in the UI ("this will sort all of the data including the rows you can't see" v.s. "this will sort the rows that are visible to you right now")?
"Sorting results of the previous query, click 'Run SQL' button again to query with ${column_name} as the ORDER BY column"
and a "got it" hyperlink to be stored in your session state store of choice upon first click on a column header would probably make it clear.
I find that data/UI tools that only sort the visible results, and not re-populate the paged view of the data, extremely counter-intuitive.
Even old libraries like ExtJS supported easy re-querying the server upon the column sorting event - though it has to be said, many lazy implementers didn't use this feature.