Re: [cx-oracle-users] Strange problem with query execution...
Brought to you by:
atuining
From: Thierry F. <thi...@on...> - 2012-04-05 12:01:37
|
Le Thu, 05 Apr 2012 05:39:40 -0600, Doug Henderson <djh...@te...> a écrit: > Look for implicit type conversions in the where clause. If columns are > converted to match the parameter type, then an index on the column > will not be used. You may need to include explicit type conversion > around the parameters to prevent implicit conversion of indexed > columns. This is a subtle problem that can be very hard to detect, > but cause horrible query performance. > > For example, a clause like "numeric_column = :param1" may need to be > coded as "numeric_column = to_number(:param1)". Thanks for the hint ! But I checked all database columns and query parameters and I only use strings; that's a point where SQLAlchemy prevents you from using bad query parameters types... Regards, Thierry -- Chef de projets internet/intranet Office National des Forêts Direction des Systèmes d'Information 2, Avenue de Saint Mandé 75570 PARIS Cedex 12 Tél. : 01 40 19 59 64 Fax. : 01 40 19 59 85 Mél. : thi...@on... WWW : http://www.onf.fr |