开发者

Zend_Db_Adapater_Oracle and "UPPER" problem

开发者 https://www.devze.com 2023-02-04 23:58 出处:网络
Following problem: Table with 1000 000 Records If i use the following query with Zend_Db_Adapter_Oracle:

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'
开发者_StackOverflow

I 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?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号