ba6.us - Dave's Database Related Stuff

  • home
  • blog
  • books
  • projects
  • about
  • !
Home

Search

Tags

apex data development funnies monitoring oracle perl rman sql sqlplus unix windows
more tags

Navigation

  • Feed aggregator

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...
more

Books

  • What Are Books?
  • Execution Plans
  • Application Express Tips
  • Copying Databases
  • Distributed Transactions
  • Instance Differences
  • Instance Info
  • Materialized Views
  • Operating System Monitoring
  • Perl
  • Perl and Oracle
  • PL/SQL
  • Real Time Monitoring of Oracle
  • SQL Profiles
  • SQLDeveloper for Non Dummies
  • Statistics
  • Tablespace Info
  • Unix Shell Scripting
  • User Security

RSS Feed - Blog Posts

Syndicate content

User login

  • Create new account
  • Request new password

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 »

  • oracle
  • sql
  • dmann's blog
  • Add new comment

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 »

  • Hint
  • sql
  • dmann's blog
  • Add new comment

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

  • development
  • pl/sql
  • sql
  • tuning
  • dmann's blog
  • Add new comment

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 »

  • oracle
  • sql
  • dmann's blog
  • Add new comment
Syndicate content


Cornify
  • home
  • blog
  • books
  • projects
  • about
  • !

Content Copyright 2006-2010. Links are copyright of respective owners.