Subject | Table Design |
---|---|
Author | chee hee |
Post date | 2007-01-23T15:28:02Z |
Hi All,
I have this customer table with the following structure and contains over millions of records.
CREATE TABLE CUSTOMER (
CUSTOMER_ID BIGINT,
CUSTOMER_NAME VARCHAR(500),
.....);
CUSTOMER_ID is the primary key.
The UI has 26 alphabet characters from A to Z. When user clicks on A, it will list all customers with name starting with A. I guess the query will be:
select ... from customer where customer_name starting with 'A';
How do I index the table for best performance? Or what is the best way to design such table.
Thanks.
CM
Send instant messages to your online friends http://uk.messenger.yahoo.com
[Non-text portions of this message have been removed]
I have this customer table with the following structure and contains over millions of records.
CREATE TABLE CUSTOMER (
CUSTOMER_ID BIGINT,
CUSTOMER_NAME VARCHAR(500),
.....);
CUSTOMER_ID is the primary key.
The UI has 26 alphabet characters from A to Z. When user clicks on A, it will list all customers with name starting with A. I guess the query will be:
select ... from customer where customer_name starting with 'A';
How do I index the table for best performance? Or what is the best way to design such table.
Thanks.
CM
Send instant messages to your online friends http://uk.messenger.yahoo.com
[Non-text portions of this message have been removed]