主键设置,总的来说int>Guid/string

简介: 主键设置,总的来说int>Guid/string 一般设置int为主键可以有更高的效率mysql: http://venublog.com/2010/04/19/choosing-the-right-data-type-makes-a-big-difference/http://venublog.

主键设置,总的来说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

目录
相关文章
|
5月前
|
Go
go string to int 字符串与整数型的互换
go string to int 字符串与整数型的互换
34 0
|
1月前
|
Python
Python系列(15)—— int类型转string类型
Python系列(15)—— int类型转string类型
|
6月前
|
Java
【Java用法】Java中String类型和int类型互转的所有方法
【Java用法】Java中String类型和int类型互转的所有方法
78 0
为什么String要被设置为不可变类?百日百题(2/100
为什么String要被设置为不可变类?百日百题(2/100
|
8月前
|
Java
Java int 与 String 的互相转换
Java int 与 String 的互相转换
42 0
|
4月前
|
Python
TypeError: int() argument must be a string, a bytes原因
Python开发过程中,使用int()函数来转换或生成int类型的数据时,如果Python抛出并提示TypeError: int() argument must be a string, a bytes-like object or a real number, not 'complex',那么原因在于传递给int()函数的参数类型有误,正如TypeError的提示,int()函数的参数必须是string字符串(数值字符串)、类似字节对象、real number数字等,而不可以是complex复数类型的数据。
106 0
|
8月前
|
Go
golang 中string和int类型相互转换
golang 中string和int类型相互转换
80 0
|
12月前
|
算法 Java 关系型数据库
如何更快地将string转换成int/long 下
如何更快地将string转换成int/long 下
|
12月前
|
存储 消息中间件 JavaScript
如何更快地将string转换成int/long 上
如何更快地将string转换成int/long 上
【剑指offer知识点】List转int[],List转String,String转int,char[]转String,String 转char[],List转String[]
【剑指offer知识点】List转int[],List转String,String转int,char[]转String,String 转char[],List转String[]
100 0