Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: query "select * from table_name where rownum = 1" very slow
there are two possible reasons:
1. Your table is heavily fragmented , it was deleted by a batch job,
and the first part of the table is all empty, doing full table scan
will read from beginning to end and it took pretty long before it
finanly find one row.
2. You are seeing some bug, and oracle is doing: select * from table_name, full scan the table, get all the result, and then return 1 row to you.
What is your oracle version and os?
I ever hit 8174 with cursor_sharing=force, and it did do that.
Received on Wed Jul 13 2005 - 04:17:02 CDT
![]() |
![]() |