How to tune any SQL Query.
Let's take an example..
I have a SQL which is taking huge time, what steps do i need to follow to tune any query.
If i am database developer then ?
If i am database DBA then ?
sorry but that link sucks. Any advice to start playing with kernel parameters and initialization parameters before tuning a single SQL statement is madness.
When creating a new db fair enough, take time to make sure the kernel parameters, disks, initialization parameters etc are setup correctly. But to do so after a system is up and running is a serious step. You need to be 100% sure that changing a kernel parameter is going to have the desired affect before doing so as it needs a server reboot.
if you want to learn how to tune SQL got to asktom.oracle.com and search for 'tuning'
To be honest, there's a lot to consider when coming to tune your SQL.
I attended a 3 day SQL Tuning course at Oracle to gain the basic understanding of what needs doing. There's no way that can be detailed in single points here on a forum.
I couldn't agree more, I've been on the same course - and that just starts you off. I think it's all about knowledge and understanding, the more you know and understand, the better you're able to tune.
The only advice I can think of is reading, testing, reading, testing and then reading some more. The oracle docs are always a good place to start
and for a really good understanding of the optimizer read Jonathan Lewis's book
from a developer's view I would go to asktom as said previously.
Awe sheez.. Again. Bashing Mr Burleson. Come on!
You guys know that is NOT acceptable!! You very well know the rules of when it comes to Burleson-bashing.
So last warning. DO NOT LET IT HAPPEN AGAIN!!
So next time around, remember.. Billy goes first! Okay?
This thread is priceless - thank you for a good laugh! ;)
About the original question - it is indeed a vast subject.
After 10 years working with Oracle you're off to a good start.
But .. just when you think you are beginning to understand something - carpet is yanked below your feet ;)