MySQL Forums
Forum List  »  InnoDB

Re: large table design / query performance
Posted by: Rick James
Date: March 05, 2013 11:23PM

There is no simple answer to your question. We really need a lot of specifics:

To assist in analyzing slow SELECTs, please provide
* SHOW CREATE TABLE tbl\G -- engine, indexes, character set
* SHOW TABLE STATUS LIKE 'tbl'\G -- sizes
* EXPLAIN SELECT ...\G -- clues of inefficiencies
and surround them with [ code ] and [ / code ]

Sure, VARCHARs are slower than INTs. But not enough to matter. The big time consumer in large tables is I/O, not fiddling with characters versus numbers. TIMESTAMP is internally the same as INT.

> Will an auto index integer primary key help

Maybe. But other things are more likely to help.

> or changing the database engine?

Maybe. InnoDB is preferred. Note: An InnoDB table must have a PRIMARY KEY.

What is the value of innodb_buffer_pool_size? How much RAM do you have?

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: large table design / query performance
1120
March 05, 2013 11:23PM


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.