Re: SQL Tuning Case .... Basic Qs ?
- From: William Robertson <william@xxxxxxxxxxxxxxxxxxxx>
- To: ORACLE-L <oracle-l@xxxxxxxxxxxxx>
- Date: Thu, 20 Nov 2008 07:32:24 +0000
|
I don't think we can assume anything about the design from the use of
OR here. Perhaps in the app the logic is something like: "find rows
where a given employee is either the owner, the assignee or the sale
owner" (whatever those mean). That could be a perfectly valid business
query. Rather than speculating about whether index use might be being prevented by some construction and whether it would help (sorry, reduce the CPU metric) to use them, it would be better to see actual explain plans and test timings along with table and index definitions etc. I can't really see where you are going with "joining first not null columns then null allowed columns" - not a rule of thumb I've come across before. Separate bitmap indexes MIGHT be worth a look for owneruserid, assigneduserid and salesownerid if there are enough queries like this to offset the additional index maintenance and locking overhead on insert/update/delete. However bitmap indexes are normally only recommended in warehouse type applications where tables can be populated in one shot, rather than in OLTP systems where rows are constantly being individually added and updated, so I would be very cautious about using them. (Also they are only available in Enterprise Edition, if that makes a difference here.) William Robertson -----Original message----- From: Subodh Deshpande Date: 19/11/08 09:12 -- http://www.freelists.org/webpage/oracle-l |
- References:
- SQL Tuning Case .... Basic Qs ?
- From: VIVEK_SHARMA
- Re: SQL Tuning Case .... Basic Qs ?
- From: Subodh Deshpande
- SQL Tuning Case .... Basic Qs ?
Other related posts:
- » SQL Tuning Case .... Basic Qs ? - VIVEK_SHARMA
- » Re: SQL Tuning Case .... Basic Qs ? - William Robertson
- » Re: SQL Tuning Case .... Basic Qs ? - Stefan Knecht
- » Re: SQL Tuning Case .... Basic Qs ? - Stefan Knecht
- » Re: SQL Tuning Case .... Basic Qs ? - Subodh Deshpande
- » Re: SQL Tuning Case .... Basic Qs ? - William Robertson
- » Re: SQL Tuning Case .... Basic Qs ? - Rumpi Gravenstein