Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is this normal speed?

Status
Not open for further replies.

philomalley

Programmer
Jan 10, 2002
1
IE
Hi, I am running Sybase ASA 6.02 on an NT box with 1 P2 333MHz, 512MB RAM.
One of my tables has 500,000 rows in it. I have three columns forming the Primary Key. There is one index on this table for these keys in ascending order.

When I do a query on this table on one of these columns in ascending order it takes approx 10 secs to return. When the table goes up to 800,000 rows the delay could be up to 120 seconds, this seems to be too slow. Can anyone help me benchmark what I should be getting?
Thanks, Philo
 
You only have a single composite index. A query will only use the index when the sarg specifies the leftmost (highest order) colum of the index.

I only have experience of ASE but i expect you could:
set noexec on
go
set showplan on
go
run query (select blah from a where ....)

Thatll show you whether it is doing a TABLE SCAN or an INDEX SCAN.

Sounds like you need to add a separate index(es) on the column(s) you are querying.
nick
 
You only have a single composite index. A query will only use the index when the sarg specifies the leftmost (highest order) colum of the index.

I only have experience of ASE but i expect you could:
set noexec on
go
set showplan on
go
run query (select blah from a where ....)

Thatll show you whether it is doing a TABLE SCAN or an INDEX SCAN.

Sounds like you need to add a separate index on the column you are querying.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top