主鍵設定,總的來說int>Guid/string,guidstring

來源:互聯網
上載者:User

主鍵設定,總的來說int>Guid/string,guidstring
主鍵設定,總的來說int>Guid/string

 

一般設定int為主鍵可以有更高的效率


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

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.