Click here to Skip to main content
15,890,995 members
Home / Discussions / Database
   

Database

 
Answerhey everyone! It's URGENT! Pin
leckey27-Sep-08 13:39
leckey27-Sep-08 13:39 
GeneralRe: hey everyone! It's URGENT! Pin
Ali Tavakol27-Sep-08 20:43
Ali Tavakol27-Sep-08 20:43 
General:face palm: Pin
leckey28-Sep-08 6:45
leckey28-Sep-08 6:45 
GeneralRe: :face palm: Pin
Paul Conrad29-Sep-08 6:50
professionalPaul Conrad29-Sep-08 6:50 
QuestionIndexing Question Pin
Meysam Mahfouzi26-Sep-08 20:49
Meysam Mahfouzi26-Sep-08 20:49 
AnswerRe: Indexing Question Pin
Wendelius26-Sep-08 22:38
mentorWendelius26-Sep-08 22:38 
GeneralRe: Indexing Question Pin
Meysam Mahfouzi26-Sep-08 23:25
Meysam Mahfouzi26-Sep-08 23:25 
GeneralRe: Indexing Question Pin
Wendelius26-Sep-08 23:51
mentorWendelius26-Sep-08 23:51 
Having both indexes (lname, age and age) is ok. However this will have some performance penalty for insert, update and delete statements.

You could try having only lname + age or lname and age separately. The optimizer will pick up the index / indexes it will consider most benefitial. You can verify optimizer behaviour using execution plan.

If you have only lname + age, it is possible that the optimizer makes horizontal scan on the index tree for the second query.

If you have lname and age separately, the optimizer can choose to make an index join for the first query.

So try all variations and use execution plan to see what is reasonable in your case (especially consider that those are hardly the only queries, so you should consider all query needs for this table if possible).

It's like playing chess Smile | :)

Mika

The need to optimize rises from a bad design

GeneralRe: Indexing Question Pin
Meysam Mahfouzi27-Sep-08 0:03
Meysam Mahfouzi27-Sep-08 0:03 
GeneralRe: Indexing Question Pin
Meysam Mahfouzi27-Sep-08 2:35
Meysam Mahfouzi27-Sep-08 2:35 
GeneralRe: Indexing Question Pin
Wendelius27-Sep-08 3:06
mentorWendelius27-Sep-08 3:06 
QuestionConvert datetime to just time (only hour) Pin
notes4we26-Sep-08 10:03
notes4we26-Sep-08 10:03 
AnswerRe: Convert datetime to just time (only hour) Pin
PIEBALDconsult26-Sep-08 10:38
mvePIEBALDconsult26-Sep-08 10:38 
AnswerRe: Convert datetime to just time (only hour) Pin
Blue_Boy26-Sep-08 23:47
Blue_Boy26-Sep-08 23:47 
QuestionSQL SP Pin
Care Career26-Sep-08 9:02
Care Career26-Sep-08 9:02 
AnswerRe: SQL SP Pin
Wendelius26-Sep-08 9:30
mentorWendelius26-Sep-08 9:30 
GeneralRe: SQL SP Pin
Care Career28-Sep-08 6:55
Care Career28-Sep-08 6:55 
GeneralRe: SQL SP Pin
Wendelius29-Sep-08 3:41
mentorWendelius29-Sep-08 3:41 
GeneralRe: SQL SP Pin
Care Career28-Sep-08 6:59
Care Career28-Sep-08 6:59 
AnswerRe: SQL SP Pin
nelsonpaixao28-Sep-08 13:33
nelsonpaixao28-Sep-08 13:33 
QuestionUniqueIdentifier Pin
Mohammad Al Hoss26-Sep-08 4:44
Mohammad Al Hoss26-Sep-08 4:44 
AnswerRe: UniqueIdentifier Pin
J4amieC26-Sep-08 4:46
J4amieC26-Sep-08 4:46 
Questionbackup from a specific table Pin
reza assar26-Sep-08 2:59
reza assar26-Sep-08 2:59 
AnswerRe: backup from a specific table Pin
Tim Carmichael26-Sep-08 5:49
Tim Carmichael26-Sep-08 5:49 
AnswerRe: backup from a specific table Pin
Wendelius26-Sep-08 6:45
mentorWendelius26-Sep-08 6:45 

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.