Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: simple sql optimize help/mlml

Re: simple sql optimize help/mlml

From: anacedent <anacedent_at_hotmail.com>
Date: Fri, 18 Jun 2004 19:11:18 -0700
Message-ID: <8hNAc.8542$8r5.4291@fed1read03>


Michel Lee wrote:
> Please help me speed up this query.
> when i run this query , it takes 46 secs.
> wlog table has many rows (> 30million).
> SQL> SELECT count(1) FROM wlog
> 2 WHERE
> 3 LOG_DATE > '14-JUN-04' and
> 4 user_id=6;
> COUNT(1)
> ----------
> 696
> Elapsed: 00:00:46.07

You should never, ever, never depend upon implicit datatype conversion!

SELECT count(1) FROM wlog
WHERE LOG_DATE > to_date('14-JUN-04',DD-MON-RR)   and user_id=6;

What do you get from the SQL above? Received on Fri Jun 18 2004 - 21:11:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US