简体   繁体   中英

PLSQL Function used in where clause - Performance Issue

I have a query which performs quite ok for a limited number of ROWNUMS but once it exceeds this particular ROWNUM it performs very miserable.

Below is the query:

SELECT p.col1,pv.col1 FROM tab1 p, tab2 tv, tab3 pv WHERE myFunc(pv.col1) = 1 AND tv.col1 = pv.col1 AND p.col1 = tv.col2 AND ROWNUM < 4500

All these tables have huge (more than a million) records.

The above query executes at a very decent speed.

If ROWNUM < 5000 or more then it takes quite a lot of time.

Is there any way I can improve the performance of the above query?

检查每个表的每个连接列上是否都有索引,然后,您可以使用功能索引,例如: http : //techonthenet.com/oracle/indexes.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM