ANSWERS: 1
  • I can answer this question for oracle SQL. I am a DBA and this is usually a complex and time consuming area of my job. The first thing to do is run an explain plan of your SQL, if you cannot do this then ask your DBA to help. This contains cost of the query as well as other hints to show what it would typically do if you take the code live. Look for obvious things in the explain plan, such as cartesian join - NOT GOOD - or full table scans where indexes should be used, or index range scans where index to table rowid can be achieved. Learn how to ask for and made proper use of indexes. Learn how to use inner and outer joins, and the use of sub-queries. There is a LOT more to look at but this should give you a good start.

Copyright 2023, Wired Ivy, LLC

Answerbag | Terms of Service | Privacy Policy