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

Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI query problem

Re: OCI query problem

From: <sybrandb_at_yahoo.com>
Date: 14 Mar 2006 01:07:18 -0800
Message-ID: <1142327238.426756.123250@u72g2000cwu.googlegroups.com>


First of all, capitalization is irrelevant in dates. Seconly, I don't know why you are using the LOWER function for every predicate. Likely it will force Oracle to conduct a full table scan on your table. This means your application will be unscalable. Thirdly -as documented- the default date format in Oracle is DD-MON-RR. If you want to use a different date format you need to use *to_date* (so birthdate= to_date('14-03-1975','dd-mm-yyyy') instead of to_char. You should avoid <function>(<indexed column>) = <hardcoded literal> ALWAYS.
You can change the default date format by issuing alter session set nls_date_format='DD-MM-YYYY' and read up on the docs on how to set it permanently.

Hth

-- 
Sybrand Bakker
Senior Oracle DBA
Received on Tue Mar 14 2006 - 03:07:18 CST

Original text of this message

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