Click here to Skip to main content
14,540,070 members
   

Database

 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
JChrisCompton25-Apr-18 4:40
MemberJChrisCompton25-Apr-18 4:40 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Eddy Vluggen25-Apr-18 5:33
professionalEddy Vluggen25-Apr-18 5:33 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
JChrisCompton30-Apr-18 5:30
MemberJChrisCompton30-Apr-18 5:30 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Eddy Vluggen30-Apr-18 5:58
professionalEddy Vluggen30-Apr-18 5:58 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
JChrisCompton30-Apr-18 7:35
MemberJChrisCompton30-Apr-18 7:35 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Eddy Vluggen30-Apr-18 8:13
professionalEddy Vluggen30-Apr-18 8:13 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Jörgen Andersson25-Apr-18 2:15
professionalJörgen Andersson25-Apr-18 2:15 
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
JChrisCompton25-Apr-18 5:47
MemberJChrisCompton25-Apr-18 5:47 
Just so you know (in the event that I ask a question here again) those inserts would be against the same database server which supports thousands of real-time users. I was experimenting because it seemed needlessly inefficient to have a clustered char(36) as the key. WTF | :WTF:

Turns out that all my questions may be moot (aside from my own learning) Sigh | :sigh:

For review exec sp_helpindex <table name> gives the following description
table #1 
clustered, unique, primary key located on PRIMARY	guid column

table #2
clustered located on PRIMARY				the int column
nonclustered, unique, primary key located on PRIMARY	guid column

There is no detectable difference on insert speed when table size is <100k.
There is a difference, but it seems trivial, when the table contains more than two million rows (14 second difference when inserting 300k rows in each table)

P.S.
Love the magnetic tape reference.

P.P.S.

> a clustered table with 300 columns and a semi-random natural key

Yikes!
GeneralRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
Jörgen Andersson25-Apr-18 10:49
professionalJörgen Andersson25-Apr-18 10:49 
PraiseRe: Naming my clustered index column which isn't the PK (and is a non-PK clustered Identity a good idea?) Pin
JChrisCompton26-Apr-18 4:17
MemberJChrisCompton26-Apr-18 4:17 
QuestionEXCEPTIONS INTO Equivalent for SQL Server Pin
Member 1208387120-Apr-18 4:59
MemberMember 1208387120-Apr-18 4:59 
AnswerRe: EXCEPTIONS INTO Equivalent for SQL Server Pin
Eddy Vluggen23-Apr-18 5:21
professionalEddy Vluggen23-Apr-18 5:21 
GeneralRe: EXCEPTIONS INTO Equivalent for SQL Server Pin
Member 1208387123-Apr-18 5:24
MemberMember 1208387123-Apr-18 5:24 
Questionhow to access temp table field in subquery? Pin
joost.versteegen11-Apr-18 21:43
Memberjoost.versteegen11-Apr-18 21:43 
AnswerRe: how to access temp table field in subquery? Pin
Victor Nijegorodov11-Apr-18 22:18
MemberVictor Nijegorodov11-Apr-18 22:18 
AnswerRe: how to access temp table field in subquery? Pin
Mycroft Holmes11-Apr-18 23:42
professionalMycroft Holmes11-Apr-18 23:42 
GeneralRe: how to access temp table field in subquery? Pin
joost.versteegen11-Apr-18 23:53
Memberjoost.versteegen11-Apr-18 23:53 
AnswerRe: how to access temp table field in subquery? Pin
Richard Deeming19-Apr-18 2:34
mveRichard Deeming19-Apr-18 2:34 
QuestionExporting Select statement values into csv with escape characters Pin
indian1439-Apr-18 12:16
Memberindian1439-Apr-18 12:16 
AnswerRe: Exporting Select statement values into csv with escape characters Pin
Victor Nijegorodov9-Apr-18 20:27
MemberVictor Nijegorodov9-Apr-18 20:27 
QuestionReading csv file data using selecte statement Pin
indian1439-Apr-18 6:50
Memberindian1439-Apr-18 6:50 
AnswerRe: Reading csv file data using selecte statement Pin
Victor Nijegorodov9-Apr-18 8:37
MemberVictor Nijegorodov9-Apr-18 8:37 
GeneralRe: Reading csv file data using select statement Pin
indian14311-Apr-18 9:18
Memberindian14311-Apr-18 9:18 
Questionwriting complex queries in Sql Pin
emilyz788-Apr-18 8:42
Memberemilyz788-Apr-18 8:42 
Questionwriting complex queries in Sql Pin
emilyz788-Apr-18 8:42
Memberemilyz788-Apr-18 8:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.