Zend_Db_Adapater_Oracle and "UPPER" problem
Following problem:
Table with 1000 000 Records
If i use the following query with Zend_Db_Adapter_Oracle:
SELECT COUNT(*) FROM XYZ WHERE (UPPER(ATTRIBUTE)='XXX') AND UPPER(OBJECT)='XX'
开发者_StackOverflowI takes a round 15sec.
If i use OCI_CONNECT (native php) i takes 3 seconds. If i remove (UPPER) from the query with the Zend Adapater its altough 3 seconds.
Does somone has an idea how to user upper and altough run an fast query? :-)
use a function based index: http://use-the-index-luke.com/sql/where-clause/functions/case-insensitive-search
however, that doesn't explain why it works better with a different connection type, sure you issue the same statement twice? or maybe caching effects?
精彩评论