MySQL Forums :: MyISAM :: would like best table/index structure advice?


Advanced Search

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

Hello,

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


Subject Views Written By Posted
would like best table/index structure advice? 5989 Kamil Chmielewski 02/26/2009 09:50AM
Re: would like best table/index structure advice? 2650 Rick James 02/28/2009 04:36PM
Re: would like best table/index structure advice? 2503 Kamil Chmielewski 03/03/2009 09:08AM
Re: would like best table/index structure advice? 2557 Rick James 03/03/2009 08:46PM
Re: would like best table/index structure advice? 2475 Kamil Chmielewski 03/08/2009 08:52PM
Re: would like best table/index structure advice? 2646 Rick James 03/09/2009 09:55AM
Re: would like best table/index structure advice? 2597 Kamil Chmielewski 03/24/2009 09:52AM
Re: would like best table/index structure advice? 2419 Aftab Khan 03/24/2009 10:13AM
Re: would like best table/index structure advice? 2453 Rick James 03/24/2009 08:04PM
Re: would like best table/index structure advice? 2656 Kamil Chmielewski 04/02/2009 11:23AM


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.