select * from (
select temp_table.*,rownum rownum_ from (
select * from (
select * from a
union all
select * from b
) order by txtime
) temp_table where (rownum< 起始记录号+笔数)
) where rownum_>=起始记录号***************************************************
大家给看看这个分页语句还能不能优化一下,现在这个查询没法用,查询的特别慢,这2个表的数据大概有600W条,
大家还有什么ORACLE里分页的查询语句呢
select temp_table.*,rownum rownum_ from (
select * from (
select * from a
union all
select * from b
) order by txtime
) temp_table where (rownum< 起始记录号+笔数)
) where rownum_>=起始记录号***************************************************
大家给看看这个分页语句还能不能优化一下,现在这个查询没法用,查询的特别慢,这2个表的数据大概有600W条,
大家还有什么ORACLE里分页的查询语句呢
如果有条件利用上高效率的索引,整个ab表符合条件的数据不是太多的话,
速度应该可以接受的