MySQL Forums
Forum List  »  MyISAM

would like best table/index structure advice?
Posted by: Kamil Chmielewski
Date: February 26, 2009 09:50AM


I have a session table (used by a website) and would like to know what the best structure (table and index) for it would be?

There are about 7 arbitrary fields in total and the primary key(unique) is the session_id-varchar(40).

This table typically has 20K rows in it and on every webpage hit (a few per second), one SELECT and one UPDATE are executed on the table. In addition, a 'DELETE on data more than 2 weeks old' is performed 5% of the time.

How would you recommend I structure this table and it's indexes?

p.s. previously I had a PK on the session_id but the UPDATE/INSERT queries took 100+sec to execute about 1% of the time. Not sure what the issue was to this day.

Edited 1 time(s). Last edit at 02/26/2009 09:51AM by Kamil Chmielewski.

Options: ReplyQuote

Written By
would like best table/index structure advice?
February 26, 2009 09:50AM

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.