Re: [cx-oracle-users] binding datetime in query
Brought to you by:
atuining
From: Mark H. <mh...@pi...> - 2011-02-14 21:15:03
|
On 2/14/11 12:32 PM, Rizzuto, Raymond wrote: > I suspect the issue may be that Oracle is converting the Date column to a datetime, and comparing each row with the datetime I passed in the bound variable. > > I tried to use datetime().date(), but cxOracle seems to still convert that to a datetime. what happens if you use to_date() in your query string, and pass in the parameter as a string? This will confirm that the execution plan is indeed using a date type, and you can see if the optimizer is still skipping over the index on the date column. if so, then there's some db or query tuning that needs to be done; if not, the problem is verified to be one of date conversion on the client side. hth! |