before: 'Hmm, I need to do the thing with the data'; hack together SQL in Squirrel until it gives the correct answer; copy SQL into program; think 'it worked in dev and test' when it turns out to be horribly slow in production; sprinkle indexes; see moderate improvements; leave alone.
now: 'Hmm, I need to do the thing with the data'; write SQL to get data, bearing in mind table indexes, join criteria, and the ease with which the database optimiser will be able to narrow down to the target data; run explain plans and check costs; remember that I need real data volumes for the explain plans to be representative of production, and repeat; copy SQL into program; never hear about it again.
And all in less than two hundred pages which--while they could be quickly summarised as 'use indexes effectively'--don't waste any time with history lessons, edge-cases, or other forms of padding. Throughout this, it still manages to highlight the differences between Oracle, SQL Server, MySQL and PostgreSQL.
I can't really offer any criticism here, hence the five stars, but if there is ever going to be a follow up then I'd like to see some coverage of DB2.
I purchased this book principally for learning SQL tunning/Performance for oracle database however the book covers several widely used DBMS such as oracle, PostgreSQL, mysql, sql server, MySQL, . . .
The domain is quite vast & as a beginner, if you just check the online oracle documentation, you can hardly find your way. This book opens the door. You learn the basic concepts and terminology (what is a BTree index, how it is read and how it can impact performance). There are many interesting examples, each of them, provided with execution plans.
At the end of the book there is a summary of how to read an execution plan (dedicated section for each DBMS) The author uses a simple language and in general it seems that the book addresses principally those who almost don't know much about the performance problems. Yet I believe non beginners can also benefit from the interesting scenarios described in the book for investigating and tackling performance problems (very good & classic examples)
The accent has been put on indexes. You will learn different type of indexes, how to improve them, how a database read an index, doing different type of index/table scans, how to investigate the cause of a slow query, etc.
Personally I liked the book and I recommend it. I would've preferred to see more details in the book about the meaning of each section of an execution plan. Also it would be more helpful if the author gives more details about hash joins and hash group by.
This book is an excellent study material on the best techniques to enhance the performance of the SQL query. It takes into account different databases: Oracle, SQL Server, MySQL and Postgresql (with a special preferences for the first one). It is written in a flowing, very understandable language, and paginated impeccably. Little bad only the missing number of pages' chapter in the header of your pages. But the content is really top-notch, complete with graphs of execution plans to better understand how to operate the query. Is an indispensable manual for anyone, DBA, developer or system administrator, cares about the performance optimization of the query.