Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> SQL SELECT with date restriction, please help !
hello every body,
Sorry but my english is bad...
1 ) FIRST SELECT :
select count(*) from sbedba.fiches
where dateent=to_date('30/08/2001')
COUNT(*)
72
Plan d'exécution
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1 Bytes=7) 1 0 SORT (AGGREGATE)
2 1 INDEX (RANGE SCAN) OF 'IDX_FICHES_DATEENT' (NON-UNIQUE) (Cost=1 Card=264 Bytes=1848)
2 ) SECOND SELECT
select count(*) from sbedba.fiches
where to_char(dateent,'DD/MM/YYYY')=to_date('30/08/2001')
COUNT(*)
1004
Plan d'exécution
0 SELECT STATEMENT Optimizer=CHOOSE (Cost=2395 Card=1 Bytes=7)
1 0 SORT (AGGREGATE)
2 1 TABLE ACCESS (FULL) OF 'FICHES' (Cost=2395 Card=2457
Bytes=17199)
I'm understand that the problem is the TIME in my DATEENT column ; But what is the solution ???
Thank you for advance,
Nicolas.
-- Nicolas Ungern-sternberg Service informatique - 376 nungern_at_sbe-online.com 03.21.10.08.35Received on Fri Aug 31 2001 - 03:55:08 CDT