Click here to Skip to main content
15,915,703 members
Home / Discussions / Database
   

Database

 
SuggestionRe: Complex SQL Query for Inventory. Need Help Pin
Richard Deeming30-Jan-14 2:24
mveRichard Deeming30-Jan-14 2:24 
Questiondatabase projects Pin
dexter.nmn29-Jan-14 1:12
dexter.nmn29-Jan-14 1:12 
AnswerRe: database projects Pin
Mycroft Holmes29-Jan-14 17:33
professionalMycroft Holmes29-Jan-14 17:33 
QuestionOptimizing a query Pin
mrkeivan28-Jan-14 19:37
mrkeivan28-Jan-14 19:37 
AnswerRe: Optimizing a query Pin
Jörgen Andersson29-Jan-14 1:44
professionalJörgen Andersson29-Jan-14 1:44 
QuestionWould an index make this query faster? Pin
khun_panya27-Jan-14 18:42
khun_panya27-Jan-14 18:42 
AnswerRe: Would an index make this query faster? Pin
Mycroft Holmes27-Jan-14 21:00
professionalMycroft Holmes27-Jan-14 21:00 
AnswerRe: Would an index make this query faster? Pin
Shameel27-Jan-14 22:43
professionalShameel27-Jan-14 22:43 
khun_panya wrote:
But would an index on cs.city_id make any different?
Most probably it will. The query optimizer decides whether to use an index or not depending on various criteria. If the number of rows in the table is very less, it might do a table scan rather than an index seek. But this is purely left to the optimizer to decide.

khun_panya wrote:
Because it looks like we have to scan entire Customer table anyway.
What makes you think so? If execution plan shows a table scan, then either an index does not exist or the number of rows is very less to warrant an index seek.
GeneralRe: Would an index make this query faster? Pin
khun_panya29-Jan-14 6:23
khun_panya29-Jan-14 6:23 
AnswerRe: Would an index make this query faster? Pin
GuyThiebaut28-Jan-14 3:32
professionalGuyThiebaut28-Jan-14 3:32 
GeneralRe: Would an index make this query faster? Pin
Jörgen Andersson28-Jan-14 9:11
professionalJörgen Andersson28-Jan-14 9:11 
QuestionAnalyser index recommendations Pin
vkEE27-Jan-14 8:32
vkEE27-Jan-14 8:32 
AnswerRe: Analyser index recommendations Pin
Mycroft Holmes27-Jan-14 12:04
professionalMycroft Holmes27-Jan-14 12:04 
AnswerRe: Analyser index recommendations Pin
Shameel27-Jan-14 22:31
professionalShameel27-Jan-14 22:31 
QuestionConditional SQL commands: Good? Bad? Pin
Gregory Gadow27-Jan-14 5:10
Gregory Gadow27-Jan-14 5:10 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Richard Deeming27-Jan-14 5:21
mveRichard Deeming27-Jan-14 5:21 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Eddy Vluggen28-Jan-14 3:21
professionalEddy Vluggen28-Jan-14 3:21 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Jörgen Andersson27-Jan-14 5:29
professionalJörgen Andersson27-Jan-14 5:29 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Kornfeld Eliyahu Peter27-Jan-14 8:07
professionalKornfeld Eliyahu Peter27-Jan-14 8:07 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Gregory Gadow27-Jan-14 10:03
Gregory Gadow27-Jan-14 10:03 
AnswerRe: Conditional SQL commands: Good? Bad? Pin
Mycroft Holmes27-Jan-14 12:00
professionalMycroft Holmes27-Jan-14 12:00 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Kornfeld Eliyahu Peter27-Jan-14 20:45
professionalKornfeld Eliyahu Peter27-Jan-14 20:45 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Mycroft Holmes27-Jan-14 20:57
professionalMycroft Holmes27-Jan-14 20:57 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Kornfeld Eliyahu Peter27-Jan-14 21:02
professionalKornfeld Eliyahu Peter27-Jan-14 21:02 
GeneralRe: Conditional SQL commands: Good? Bad? Pin
Mycroft Holmes27-Jan-14 21:06
professionalMycroft Holmes27-Jan-14 21:06 

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.