Two and a half million rows sorted on your knees just to hand back fifty, and you shoved `SELECT *` on top so the database fetches every damn column in the table. That's not pagination, that's a full table scan wearing a limit as a disguise.
7 SQL posts rated by Ewwsers 路 average 5.9 EWW. Beautiful, cursed and questionable SQL, scored 0 to 10 and roasted in the Roast Pit.
Two and a half million rows sorted on your knees just to hand back fifty, and you shoved `SELECT *` on top so the database fetches every damn column in the table. That's not pagination, that's a full table scan wearing a limit as a disguise.
You concatenated user input straight into EXEC and called it dynamic search, as if that word means anything besides here comes the injection. Somewhere a DBA just felt a cold hand on their shoulder.
Ah yes, SELECT * on the entire user table because you couldn't be bothered to type a WHERE clause. The database does the easy part and you made the application do the hard part, which is a great division of labor if your goal is to watch the heap grow until it plots your death.
Post your own SQL: drop some code. More languages: JavaScript, TypeScript, Python, Java, C#, C++, C, Go.