Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Problem with Decode fuction
> > What about this one?:
> >
> > select decode(count(1),1,0,null) from DUAL
> > where exists (select 1 from pm_ticketroutinglinks
> > where classification = 'PROCUREMENT_NEW' AND
> > component_type = 'CLIENT_HARDWARE' AND
> > component = 'PC_DELL');
> >
> This you have to answer yourself ... does it float your boat?
> Does it reduce the number of consistent reads you have to do to achieve
your
> purpose ..
I didn't check. Also the table isn't to big at the moment and as far as I'm
concerned it will never be.
> Does it give you the correct results?
YES!
> In case you are wondering what are consistent reads .. then you need to
read
> a lot about performance tuning.
> For a start I can only say: "set autotrace on" in sqlplus and look at the
> consistent reads. Usually lower is better...
Are there alternatives to the above quesry with respect to performace?
Or is the comparsion to DUAL the non-plus-ultra of this kind of querys?
Thanks
Tom
Received on Sun Sep 28 2003 - 15:19:21 CDT
![]() |
![]() |