Set the primary key. In general, int> Guid/string, guidstring
Set the primary key. In general, int> Guid/string
Generally, setting int as the primary key is more efficient.
Mysql:
Http://venublog.com/2010/04/19/choosing-the-right-data-type-makes-a-big-difference/
Http://venublog.com/2010/04/20/int-and-string-data-comparison-difference-in-performance-because-of-quotes/
Http://www.karafilis.net/sql-indexing-part4/
Mssql:
Http://www.sql-server-performance.com/2007/datatypes/
Http://bytes.com/topic/sql-server/answers/143943-int-versus-char-primay-key-performance
Http://www.codeproject.com/Articles/22853/SQL-Server-Performance-Tips-and-Guidelines
Https://www.simple-talk.com/ SQL /t-sql-programming/searching-for-strings-in-sql-server-databases -/
Http://www.informit.com/articles/printerfriendly/25862
How to choose?
Http://blog.codinghorror.com/primary-keys-ids-versus-guids/
Http://databases.aspfaq.com/database/what-should-i-choose-for-my-primary-key.html
Http://www.informit.com/articles/printerfriendly/25862
Http://krow.livejournal.com/497839.html
Others:
Http://programmers.stackexchange.com/questions/189026/why-is-the-usage-of-string-keys-generally-considered-to-be-a-bad-idea
Http://www.dbforums.com/showthread.php? 1666783-int-vs-varchar-columns-performance
Http://sqlinthewild.co.za/index.php/2011/02/15/are-int-joins-faster-than-string-joins-2/
Http://www.codeproject.com/Articles/17512/DataRow-Indexing-Performance-Integer-vs-String