Hi there,

I grabbed the MySQL reference book and was doing some reading on the different Integer 
types..

Something that I noticed was that you could also add an option to say if a Int was 
unsigned ot signed..

Does it have any sence to use a signed int on a autoincrement table..?
E.g. When using a auto-increment correctly you will never need a negative number..
Do I need to do an optimize on a table when changing this from signed to unsigned..?

The reason I was reading this section was to see how the range of the different 
integers were...

An Int is 4 bytes and a Medium Int is 3 bytes.. Can you roughtly say dat a Medium Int 
is 33% faster when doing queries
on this column.. (Roughly speaking..)... I want to use a INT on a column which is used 
as a autoincrement...

MediumInt will probably also be more than enough... But I want to make 1000% sure that 
I will never reach the limits..
Do I throw away a lof of speed when grabbing a integer which probably is to large for 
me..?

What I also noticed is that you can add a 'length' tag to a integer. Why is this, why 
would you want to make the length shorter than
the
integer type permits..?

Thanks for any suggestions/answers..

Bye Bye
David






---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to