MySQL Forums
Forum List  »  Microsoft SQL Server

Re: Problem with primary key with size>256
Posted by: Michael G. Zinner
Date: June 03, 2005 12:54PM

In 98% of the cases using a VARCHAR column as primary key is a _very_ bad idea that results in poor performance. So you should always us a integer type as primary key datatype.

In your specific case the MySQL server converts the VARCHAR(512) to a SMALLTEXT datatype because MySQL only supports VARCHARs up to 256 characters.


Michael Zinner, Team Lead, Developer Tools

Are you MySQL certified?

Options: ReplyQuote

Written By
Re: Problem with primary key with size>256
June 03, 2005 12:54PM

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.