简体   繁体   English

where子句中使用的PLSQL函数-性能问题

[英]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. 我有一个查询,它对于有限数量的ROWNUM可以很好地执行,但是一旦超过该特定的ROWNUM,它的执行就会非常惨。

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. 如果ROWNUM <5000或更多,则将花费大量时间。

Is there any way I can improve the performance of the above query? 有什么办法可以改善上述查询的性能?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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