Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Sql Tuning help
Here's
some thoughts.
<SPAN
class=661204616-07022001>
I
don't know if between is faster, but it might be, and won't a straight join do
the same as your subquery?
<SPAN
class=661204616-07022001>
<SPAN
class=661204616-07022001>SELECT
to_char(NVL(SUM(bet_amount),0))
<SPAN
class=661204616-07022001>FROM
sb_bets
<SPAN
class=661204616-07022001>WHERE
processed_DATE between add_months( .............) and
add_months( ..........) AND
customers.customer_id = sb_bets.customer_id AND
customer.licensee_id = 6130;
<SPAN
class=661204616-07022001>
Dan
"Just my thought"
<FONT face=Tahoma
size=2>-----Original Message-----From:
SouthcottM_at_StarnetSystems.net
[mailto:SouthcottM_at_StarnetSystems.net]Sent: Wednesday, February 07,
2001 8:31 AMTo: Multiple recipients of list
ORACLE-LSubject: Sql Tuning help
I have been having
some problems with this statement
<SPAN
class=732172014-07022001>SELECT
to_char(<FONT
color=#000000>NVL(<FONT
color=#008000>SUM(<FONT
face=Arial>bet_amount<FONT color=#808000 size=1>)<FONT color=#000000 size=1>,0<FONT color=#808000 size=1>))<FONT face=Arial>FROM<FONT color=#000000 size=1> sb_bets<FONT face=Arial>WHERE<FONT color=#000000 size=1> processed_DATE <FONT color=#808000 size=1>>=
face=Arial>TO_DATE<FONT color=#808000 size=1>(<FONT color=#0000f0 size=1>'07011999 000000',<FONT
size=1>)<FONT color=#000000 size=1>,19<FONT color=#808000 size=1>-1<FONT color=#808000 size=1>)
size=1>(<FONT color=#000000 size=1>TO_DATE(<FONT face=Arial>'07011999 000000'<FONT
face=Arial>,<FONT color=#800000 size=1>19)<FONT face=Arial> <FONT color=#008000 size=1>AND
Matt
Southcott
DBA
<SPAN
class=474161317-01022001>Starnetsystems
(268) 480
1734
<SPAN
class=474161317-01022001>
_____________________________________________________________________Thismessage has been checked for all known viruses by UUNET delivered through the MessageLabs Virus Control Centre. For further information visit<A virus security products www.uk.uu.net hrefhttp:>http://www.uk.uu.net/products/security/virus/ Received on Wed Feb 07 2001 - 12:06:57 CST