![]() SQL for Query Writers: Based on Oracle Database 11g $39.99 I am the author of this book. I thought that I would take a moment to share a little about this book with you. SQL queries are what you develop or write when you are writing reports, customizing BI dashboards and developing software against a database. I've been helping new report developers and programmers write SQL, tune SQL and refactor SQL over the last 10 years. When I recommend a good SQL book or reference the online Oracle documentation I have found that it can be overwhelming for those new to SQL. This was my motivation in writing "SQL for Query Writers". "SQL for Query Writers" is a pure SQL book that leaves out all of the DBA-related SQL commands (as report writers are not typically managing databases). I also include many of the SQL optimizations that I have used over the years to achieve performance expectations (another hard thing to learn). So I invite you to take a look at my book with Amazon's Look Inside feature. The source code for creating the examples in this book is available online as a free download. ![]() SQL Server 2008 Query Performance Tuning Distilled (Expert's Voice in SQL Server) $54.99 One of the finest book on SQL Server Perf Tuning. To be honest I used to have the SQL Server performance tuning book by Ken England on SQL 2000 and looking for it's sequel on 2005. I went to the book store and ordered the book but it was disappointing. Then this book was given to me by one of my friends. A great reference book as I was expecting. Lot of theories and matching examples make this book stand out from the rest. SQL Server is just not SQL Tuning. It includes Database System tuning. This book has given a dedicated chapter in making you understand the same. It gives you a perspective on how to approach to a performance tuning from identification of the performance bottleneck to troubleshooting the problem. I enjoyed reading chapters on indexing and Index, Statistics and Execution Cache Analysis. However, I wanted to see more detail on tuning XML and Service Broker. I will suggest this book for other DBAs and SQL Programmers who want to know the theories behind Index and Statistics, BLocking and Deadlocking, Fragmentation. ![]() Beginning SQL Queries: From Novice to Professional $34.99 Disclaimer: although I have had nothing to do with this book and I have never met the author (we live at the antipodes of each other), I was the technical reviewer for her previous book - and I am the author of two SQL books, none of them for beginners. Knowing Clare's style, I have been extremely surprised by some of the reviews of this book, which are rather harsh. I got a copy of "Beginning SQL Queries", and read it to have an opinion of my own. Several reviewers complain about the references to algebra and calculus; I think they have missed Clare's point, which was to show that there are two writing styles with SQL. She could have called them style A and style B, but unfortunately she is rather precise in what she writes and chose to call them by their received names of algebra and calculus, which I agree are dirty names. Which one is algebra and which one is calculus is usually something I forget very fast, and I've practiced SQL for a quarter of a century; believe me, you can use both styles without knowing their names. I also take objection to one reviewer's comment that "it is clear the author doesn't actually understand SQL. A table alias is not a 'row variable'". Perhaps Clare didn't make her point clear enough; but when you write a correlated subquery, as in select ... from ta outer where exists (select 1 from tb inner where inner.id = outer.id) "outer" (the table alias) in the subquery actually refers to the current row from the outer query. Perhaps an unusual way to introduce the topic; but I have always believed that the goal of a book should be to intellectually challenge the reader and bring him or her to see the topic in a different light. All this being said, I'm not convinced by some aspects of the book. For one thing, if the author actually starts from the "novice" stage, she doesn't really bring the reader to the "professional" stage in my humble opinion; the coverage of topics like indexing is light, and none of the examples is even remotely as complex as what I routinely encounter. This makes the introduction (fortunately discrete) of formal notations look like an overkill with no real added value. Better to concentrate on the figures, which are extremely clear. If you just wish to make some quick and dirty SQL job, "Beginning SQL Queries" is probably not a book for you - I guess that any tutorial on the web and a bit of trial and error will get you started. You won't go very far, but sometimes you don't want to. I rather see this book as a good bridge between college and the professional world - it combines the rigor of text books (although it doesn't theorize, all the key points from the theory are here) with the conversational tone of books that are aimed at the professional world; strictly correct without being dry. It will not turn you into a full-blown database professional, but if what you have seen - or not seen - at school is hazy and if you are serious about ensuring that you have sound foundations, reading "Beginning SQL Queries" is a good way to start. ![]() Inside Microsoft˘î SQL Server(TM) 2005: Query Tuning and Optimization $49.99 SQL performance tuning is probably one of those things you can do to really make a HUGE difference in performance. Let's put this in perspective: take a typical application, if you can improve the performance by 100% then you really made a huge improvement. You can improve a SQL query by 1000% with 2 lines of code (sometimes all you have to do is take away a % sign). If you can make a query sargable so that the optimizer can do an index seek instead of an index scan your query might go from 12 seconds to 200 milliseconds. Now try doing that in an application, even if you change all the string concatenation to use a stringbuilder instead of creating new strings all the time you will not get such a drastic performance improvement. I am sure you get the point by now, let's talk about the book. This book is part 4 of the Inside Microsoft SQL Server 2005 series, it is written by Kalen Delaney and five other authors. There are 6 chapters in this book 1 A Performance Troubleshooting Methodology This chapter explains some typical things that affect performance and also gives a troubleshooting overview 2 Tracing and Profiling This chapter explains how to use the profiler and how to analyze traces. SQL Server's built-in traces are also covered 3 Query Execution This chapter gives a query processing and execution overview. It explains how to read plans and goes into a lot of detail about analyzing plans 4 Troubleshooting Query Performance This chapter explains how to detect problems in plans, how to improve queries and some best practices 5 Plan Caching and Recompilation This chapter goes into detail about plan caching and recompilation and how to troubleshoot plan cache issues 6 Concurrency Problems The final chapter deals with concurrency (locking, blocking and deadlocking) This is an excellent book for an intermediate/advanced developer. There is so much new stuff in SQL Server 2005 compared to 2000 to help you with tuning queries that you probably want to read each chapter several times. The Dynamic Management Views are a big help and this book shows you how to use them. Some other cool stuff in this book is the discussion of internal tables, undocumented DBCC commands and undocumented trace flags to discover information which could help you determine much faster what the cause of a performance problem might be. Some pages are packed with so much information that you need to pause for a second and process all that info (I have read some pages two to three times in a row). You will also find out that there are more joins besides left, full and outer. Page 137 for example has a nice table with the three Physical Join Operators: Nested Loop Join, Hash Join and Merge Join. This table lists the characteristics for each of these joins. If you are an intermediate to advanced developer then I highly recommend this book. |
|