LeakyAbstractions

March 24, 2009
JoelOnSoftware's excellent article.

An abstraction is anything within an application (or computer, device, etc.) that packages up all the messy details so you don't have to worry about them, allowing you to instead focus on the bigger picture. Lots of things are abstractions: from operating systems to steering wheels to, well, software developers.

Here's an excerpt from the article:
The SQL language is meant to abstract away the procedural steps that are needed to query a database, instead allowing you to define merely what you want and let the database figure out the procedural steps to query it. But in some cases, certain SQL queries are thousands of times slower than other logically equivalent queries. A famous example of this is that some SQL servers are dramatically faster if you specify “where a=b and b=c and a=c” than if you only specify “where a=b and b=c” even though the result set is the same. You're not supposed to have to care about the procedure, only the specification. But sometimes the abstraction leaks and causes horrible performance and you have to break out the query plan analyzer and study what it did wrong, and figure out how to make your query run faster.


https://github.com/alex/what-happens-when

tags: ComputersAndTechnology

comments powered by Disqus