What is SQLT?

There’s nothing more annoying than having to struggle to do something because you don’t have the right tools. That’s why I love my swiss army knife and why when working for Oracle, I love SQLT. What is SQLT? Read on and find out.

Victorinox Swiss Army knife, photo taken in Sw...
Victorinox Swiss Army knife, photo taken in Sweden. This is a Mountaineer model. (Photo credit: Wikipedia)

My wife often complains that I’m difficult to buy gifts for, but this year, on my birthday, she chose a winner; a bigger, better Swiss Army Knife. I used to carry a torch, a calculator and a smaller SAK, but now I have a single tool. If there’s one thing I’ve learned in life it’s that using the right tool simplifies the job. That’s not just for DIY. The right tool simplifies any job. A hammer will get a nail in better than a shoe, and a nail gun, well, there’s no comparison. That’s why I was annoyed when I ‘discovered’ SQLT.

Having been a DBA for over twenty years, I’d dealt with hundreds of tuning problems and spent thousands of hours looking at 10046 and 10053 trace files and sorting through tables of statistics. All that time I’d lacked the best tool for the job, the tool that would have made the task simpler and a whole lot faster. Since I’d just begun to work for Oracle, I made the assumption that the tool, called SQLTXplain (or just SLQT) was for internal Oracle use only, but I was wrong. SQLT is available, free, to all supported customers, the problem is, most supported customers don’t know it exists.

Working for Oracle, I use SQLT every day and every day I talk to customers who’ve never heard of it, don’t know what it does, or don’t know how to use it, so I decided to write a book to help solve part of the problem. Some said SQLT could be documented in a single page. A book was unnecessary. Those of us who use SQLT on a daily basis know that’s not true.

Most DBA’s agree that tuning is the trickiest of the DBA’s tasks, whether you’re tuning the database generally or a specific SQL statement. To make matters worse, tuning problems often have to be solved to a deadline. Everything was fine, then, for no apparent reason, everything slowed down and the company is losing millions as a result. It’s just another day in the life of a DBA, but imagine you work in Oracle support, on the team devoted to tuning problems. You deal with problems like that on a daily basis, and often more than one in a day. There’s no way you can support customers if you have to spend hours pouring over reports, so it’s not surprising that it was an Oracle Support engineer, Carlos Sierra, who developed SQLT. The goal was not to be able to fix SQL problems, but to be able to gather all the necessary information in a readily useable form. Half a day with SQLT will usualy provide the explanation you need. You’ll know why your SQL was slow, or you’ll understand why it can’t go any faster.

SQLT isn’t part of the Oracle product set, and it isn’t mentioned in the documentation, but its available, free, to download, and Carlos Sierra, the engineer who created SQLT spends much of his time improving and adapting it. It’s a practical tool, and well worth learning. I can’t imagine life without SQLT, I only wish I’d learned about it long ago.

2 thoughts on “What is SQLT?”

  1. Pingback: Tuning Oracle SQL
  2. SQLT is a free to download tuning assistance tool. It collects information on a SQL and gives suggestions on how to tune it and collects metrics on the SQL as well as many other utilities related to SQL tuning

Leave a Reply

Your email address will not be published. Required fields are marked *