on 16 March 2016
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.
on 1 July 2013
I have a database with 7.5 million records and I was struggling with a query that was taking about 1 minute, 30 seconds to execute. 43 pages in and it is now executing in 3 seconds.
This is exactly the result I was looking for.
This is a technical book, aimed specifically at application developers, however it is well written and is not too heavy on the guts of databases.
The first part of the book explains indexing very clearly and very simply. It then goes on to highlight the finer points of joins, sorting, clustering etc.
Worked for me.
on 29 August 2014
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.
My conclusion: Excellent book and I recommend it.
on 16 October 2012
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.
on 14 June 2013
This is a good book with just the right amount of detail for the typical SQL Developer tasked with implementing business logic and lacking the time or inclination to wade through DBA-focused tomes. Weighing in at around 200 pages, this book provides numerous insights related to index usage that are unlikely to be found in too many books this size.
on 23 June 2014
With a very well explained content and examples, this book should be compulsory for architects, programmers and database administrators. This book uses a simple language to explain advanced topics about SQL, performance and relational databases. I recommend strongly!