Print Thread
My problem is diferent than TOraclewwDataset
#794 08/23/00 11:37 PM
Joined: Aug 2000
Posts: 2
Seville-Spain
M
mfdez Offline OP
Member
OP Offline
Member
M
Joined: Aug 2000
Posts: 2
Seville-Spain
I have the folowing problem:

I have a table named PRUEBA with two columns
and 15,000 rows:
cod number(9)
des varchar2(30)

two indexes
primary cod
secondary des

when i open the table with the sql
<select * from PRUEBA>
it open in 2 or 3 seconds

but if the sql is
<select * from PRUEBA order by des>
it open in Oracle Server.8 30 seconds
it open in Personal.8 in 50 seconds more or less.

Someone knows what happend?

Please help me!!

My project is stopped since 19/08/2000.

Thanks and Excuse me for my English !!

Re: My problem is diferent than TOraclewwDataset
#795 08/24/00 04:56 PM
Joined: Aug 1999
Posts: 22,208
Member
Offline
Member
Joined: Aug 1999
Posts: 22,208
Perhaps you can use the explain plan utility or the tkprof utility and SQLTrace to find out what is going on during these 30 seconds? It seems to me that the Oracle Server has decided to do a full table scan and an internal sort, instead of using the index. If so, perhaps the statistics for this table needs to be analyzed:

analyze table prueba compute statistics;


------------------
Marco Kalter
Allround Automations


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.131s Queries: 13 (0.056s) Memory: 2.4966 MB (Peak: 3.0393 MB) Data Comp: Off Server Time: 2024-05-03 23:19:29 UTC
Valid HTML 5 and Valid CSS