Join the No OFFSET Movement!

Markus Winand from Use The Index, Luke! did it again. He started an exciting battle against one the biggest flaws in the SQL language: We've blogged about this before. OFFSET pagination is terribly slow, once you reach higher page numbers. Besides, chances are, that your database doesn't even implement it correctly, yet (and your emulation … Continue reading Join the No OFFSET Movement!

Stop Trying to Emulate SQL OFFSET Pagination with Your In-House DB Framework!

I'm pretty sure you've gotten it wrong in numerous ways, so far. And you probably won't get it right any time soon. So why waste your precious time on SQL tweaking, when you could be implementing business logic? Let me explain... It hasn't been until the recent SQL:2008 standard that what MySQL users know as … Continue reading Stop Trying to Emulate SQL OFFSET Pagination with Your In-House DB Framework!

SQL Server Trick: Circumvent Missing ORDER BY Clause

SQL Server is known to have a very strict interpretation of the SQL standard. For instance, the following expressions or statements are not possible in SQL Server: -- Get arbitrarily numbered row_numbers SELECT ROW_NUMBER() OVER () -- Skip arbitrary rows SELECT a FROM (VALUES (1), (2), (3), (4)) t(a) OFFSET 3 ROWS Strictly speaking, that … Continue reading SQL Server Trick: Circumvent Missing ORDER BY Clause

Faster SQL Pagination with jOOQ Using the Seek Method

Last week, I have blogged about why it is important to stay in control of your SQL, as writing good SQL helps keeping your operations costs down. This is true in many ways and today, we're going to look into another way to write good, high-performing SQL: Using the "Seek Method". Slow OFFSET In order … Continue reading Faster SQL Pagination with jOOQ Using the Seek Method

SAP’s Hilarious SQL Whitepaper(s)

While looking for some authoritative information about Sybase SQL Anywhere 12's TOP .. START AT clause, I stumbled upon this hilarious white paper here, which I do not want to keep from you: http://www.sybase.com/files/White_Papers/Sybase_Top_10_Features_In_SQL_Anywhere_12.pdf I will take advantage of "fair use policy" and cite parts from section 7: Feature number 7: improved support for DaffySQL … Continue reading SAP’s Hilarious SQL Whitepaper(s)