Click here to Skip to main content
15,888,968 members
Home / Discussions / Database
   

Database

 
AnswerRe: RAISEERROR problem Pin
J4amieC19-Jan-09 22:17
J4amieC19-Jan-09 22:17 
GeneralRe: RAISEERROR problem Pin
George_George20-Jan-09 2:51
George_George20-Jan-09 2:51 
AnswerRe: RAISEERROR problem Pin
Hamid_RT22-Jan-09 23:18
Hamid_RT22-Jan-09 23:18 
GeneralRe: RAISEERROR problem Pin
George_George4-Feb-09 22:44
George_George4-Feb-09 22:44 
QuestionOptimize an query select DB Pin
TuanNGUYEN19-Jan-09 16:48
TuanNGUYEN19-Jan-09 16:48 
AnswerRe: Optimize an query select DB Pin
Wendelius19-Jan-09 18:19
mentorWendelius19-Jan-09 18:19 
GeneralRe: Optimize an query select DB Pin
TuanNGUYEN19-Jan-09 20:04
TuanNGUYEN19-Jan-09 20:04 
GeneralRe: Optimize an query select DB Pin
Wendelius20-Jan-09 8:28
mentorWendelius20-Jan-09 8:28 
That's true. If you would have the data in db (in some table format) that would be the best for the query itself. However, how would you get the data to the temporary table. In worst scenario you add it row by row. Little better if you can add them simultaneously, but still you're creating a table and populating it and both of those are time and resource consuming operations. So in overall even if the last query gets simplified, the overall throughput may be worse.

This is exactly why I mentioned the modeling of the db. If you could prevent those dynamic lists or make them significantly smaller, it would have a great impact to your query. But in order to do that, you would have to find common "feature" from the values, which you should then store in lookup tables. I can't say if this is possible at all or how it would be implemented in your case since it would require a whole lot of information about the issue.

One possibility you could use is to create a procedure which gets an array (or user defined table) of values and then uses a those values in join using the original query. I wrote a brief article on that: http://www.codeproject.com/KB/database/TableValuedParameters.aspx[^] but the downside is that it's SQL Server specific.

The need to optimize rises from a bad design.My articles[^]

Question"begin catch" and "end catch" Pin
George_George19-Jan-09 2:38
George_George19-Jan-09 2:38 
AnswerRe: "begin catch" and "end catch" Pin
J4amieC19-Jan-09 4:02
J4amieC19-Jan-09 4:02 
GeneralRe: "begin catch" and "end catch" Pin
George_George19-Jan-09 18:41
George_George19-Jan-09 18:41 
AnswerRe: "begin catch" and "end catch" Pin
Rob Philpott19-Jan-09 6:29
Rob Philpott19-Jan-09 6:29 
GeneralRe: "begin catch" and "end catch" Pin
George_George19-Jan-09 18:40
George_George19-Jan-09 18:40 
GeneralRe: "begin catch" and "end catch" Pin
Rob Philpott19-Jan-09 23:13
Rob Philpott19-Jan-09 23:13 
GeneralRe: "begin catch" and "end catch" Pin
George_George20-Jan-09 3:01
George_George20-Jan-09 3:01 
GeneralRe: "begin catch" and "end catch" Pin
Rob Philpott20-Jan-09 3:13
Rob Philpott20-Jan-09 3:13 
AnswerRe: "begin catch" and "end catch" Pin
Wendelius19-Jan-09 7:06
mentorWendelius19-Jan-09 7:06 
GeneralRe: "begin catch" and "end catch" Pin
George_George19-Jan-09 18:51
George_George19-Jan-09 18:51 
GeneralRe: "begin catch" and "end catch" Pin
Wendelius20-Jan-09 6:39
mentorWendelius20-Jan-09 6:39 
AnswerRe: "begin catch" and "end catch" Pin
Hamid_RT22-Jan-09 23:18
Hamid_RT22-Jan-09 23:18 
QuestionConvert Columns as Rows Pin
Vignesh Krishnan19-Jan-09 1:40
Vignesh Krishnan19-Jan-09 1:40 
AnswerRe: Convert Columns as Rows Pin
Wendelius19-Jan-09 2:05
mentorWendelius19-Jan-09 2:05 
GeneralRe: Convert Columns as Rows Pin
Vignesh Krishnan19-Jan-09 3:12
Vignesh Krishnan19-Jan-09 3:12 
GeneralRe: Convert Columns as Rows Pin
Wendelius19-Jan-09 6:55
mentorWendelius19-Jan-09 6:55 
GeneralRe: Convert Columns as Rows Pin
Vignesh Krishnan19-Jan-09 8:45
Vignesh Krishnan19-Jan-09 8: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.