Jump to content

[SOLVED] Best size for varchar.


gevans

Recommended Posts

Hey guys,

 

If I'm making a simple table of pages, something like this;

 

CREATE TABLE `pages` (
`id` INT NOT NULL,
`title` VARCHAR(50) NOT NULL,
PRIMARY KEY(`id`)
) ENGINE = MYISAM

 

Is there any specific character lengths that are better for optimisation? For example if I want around 50 characters (not to bothered) is 64 better?

 

Cheers

Gareth

Link to comment
https://forums.phpfreaks.com/topic/168697-solved-best-size-for-varchar/
Share on other sites

Yea, I get that. But say I don't really care the size of the field, like a username, I'm going to restrict its length to something, and this will be checked before going into a database. But would 16 be better than 20 for the db going with the whole bits in a bytes etc..?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.