MySQL Forums
Forum List  »  Performance

Slow performance on handler `primary` first
Posted by: christian nieling
Date: March 03, 2009 01:49AM

I'm trying to let our legacy cobol application talk to MySQL, for this I'm using the MySQL HANDLER statement.

In stead of the cobol start command, I now use:
HANDLER MYTABLE READ `PRIMARY` FIRST WHERE ALPAHKEY>='1%';

This will put the pointer on the first record starting with `1`, no problems here.

However the further I get into the table the longer it will take to execute the mysql handler statement.
HANDLER MYTABLE READ `PRIMARY` FIRST WHERE ALPAHKEY>='Z%';
Will take more the 10 seconds to execute on a large table?

ALPHAKEY is the primay key field of MYTABLE.

Shouldn't it just put the pointer on the first record starting with `Z` using the primary key? does anyone know how to speed this up, or knwo any other soluition?

Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
Slow performance on handler `primary` first
3550
March 03, 2009 01:49AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.