我在下面native sql query。我正在使用Oracle数据库。
select
*
from
(select
row_.*,
rownum rownumber
from
(select
colmn1,
colmn2,
colmn3,
colmn4,
colmn5,
colmn6,
from
Table5
where
colmn5 In (
'19901','10001'
)
order by
colmn1 ) row_ )
Where
Rownumber <= 50000
and rownumber > 0
上面的查询返回50000记录。如果我执行上面的查询sqldeveloper,它只需要30 seconds但在 spring 和 hibernate 集成应用程序中需要15 minutes。我怎样才能提高性能?
谢谢!