Search
Navigation
Recent blog posts
- Oracle IN Condition and Multi Column Subqueries
- SQL For Dinosaurs
- Quickie script to run dbv on your database...
- Permissions for Autotrace
- Accuracy of PROFILER.SQL from Metalink Doc: 243755.1
- Recording Oracle System Stats for historical analysis...
- Shell Script to Run a SQLPLUS against all databases running on a server...
- Viewing command line args with Solaris ps utility...
- Orion IO Test Tool
- Documented Hints available in 11.2...
Books
User login
sql
Oracle IN Condition and Multi Column Subqueries
dmann — Fri, 02/19/2010 - 15:02
I keep coming across a construct in some legacy SQL that has been causing all kinds of performance issues for us. I guess you could call it using the IN condition with multi-column subqueries. I located the syntax for the IN condition here but it doesn't really get into much detail about using this construct.
Here is an example of the subquery (it returns the lowest salary and department_id for each department):
Read more »
Documented Hints available in 11.2...
dmann — Wed, 11/25/2009 - 11:53
As I get deeper into tuning with Statistics and the CBO I have been paying a lot more attention to hints.
In the past I always tried to avoid hints. After working with the CBO and staistics in recent versions I believe they are necessary at times to give guidance to the CBO.
The Oracle Database SQL Language Reference has a comprehensive list of hints included in the documentation of SQL Comments. The list for 11g is available here: link. Read more »
Food for thought - Who Should Tune SQL - DBA or Developer?
dmann — Mon, 07/20/2009 - 11:35
Iggy Fernandez covers the topic of who is better suited to tune SQL - Developers or DBAs. Also listed are 5 Dangerous Beliefs which may influence the answer to that question.
http://iggyfernandez.wordpress.com/2009/07/12/who-should-tune-sql-the-dba-or-the-developer/
-Dave
Make your queries Self Aware...
dmann — Sat, 10/04/2008 - 20:59
In past Oracle versions you may have used USERENV() to access some of this information. The information is now available in the 'USERENV' namespace of the sys_context function.
http://www.techonthenet.com/oracle/functions/sys_context.php
Here is a useful example. When monitoring the current in-flight SQL it is nice to exclude the current query from the results: Read more »