Click here to Skip to main content
15,887,135 members
Home / Discussions / Database
   

Database

 
AnswerRe: problem while import TXT file Pin
_Damian S_9-Dec-09 20:23
professional_Damian S_9-Dec-09 20:23 
GeneralRe: problem while import TXT file Pin
koolprasad200310-Dec-09 22:24
professionalkoolprasad200310-Dec-09 22:24 
QuestionTable result to Xml Pin
Fayu9-Dec-09 5:31
Fayu9-Dec-09 5:31 
AnswerRe: Table result to Xml Pin
Riaan Booyzen9-Dec-09 20:05
Riaan Booyzen9-Dec-09 20:05 
QuestionSQL query optimization Pin
Member 46483709-Dec-09 1:59
Member 46483709-Dec-09 1:59 
AnswerRe: SQL query optimization Pin
WoutL9-Dec-09 2:30
WoutL9-Dec-09 2:30 
GeneralRe: SQL query optimization [modified] Pin
Member 46483709-Dec-09 3:02
Member 46483709-Dec-09 3:02 
GeneralRe: SQL query optimization Pin
Member 46483709-Dec-09 3:47
Member 46483709-Dec-09 3:47 
30 mins or so later...


Hi Wout,

OK your revised query worked (apart from minor error in line 1).

BUT - and this is interesting - I thought I had this one licked.

However I just ran Wout's suggested statement natively in SQL Manager and it produced results very quick. I tried a different parameter (different report) and it also worked well.

I then tried to run it from code - which actually calls a SP that contains the query as Wout suggested... and ALAS it takes forever...

I tried the original statement in SQL (not from SP) and it works very quick as well.

I then called the SP from SQL manager using "EXEC sp_...." and it also took forever.

It would appear that calling this transaction from a SP dramatically slows it down.

Why is this?

Any other good suggestions?
GeneralRe: SQL query optimization Pin
WoutL9-Dec-09 20:46
WoutL9-Dec-09 20:46 
AnswerRe: SQL query optimization Pin
_Damian S_9-Dec-09 19:24
professional_Damian S_9-Dec-09 19:24 
Questionsystem error code 126 Pin
T21029-Dec-09 1:21
T21029-Dec-09 1:21 
Question"Syscomments" system table corrupted Pin
www.Developerof.NET9-Dec-09 0:28
www.Developerof.NET9-Dec-09 0:28 
AnswerRe: "Syscomments" system table corrupted Pin
Ashfield9-Dec-09 1:17
Ashfield9-Dec-09 1:17 
QuestionSQL Copy Table in C# Pin
bxlorenz8-Dec-09 13:40
bxlorenz8-Dec-09 13:40 
AnswerRe: SQL Copy Table in C# Pin
loyal ginger8-Dec-09 15:49
loyal ginger8-Dec-09 15:49 
AnswerRe: SQL Copy Table in C# Pin
Niladri_Biswas8-Dec-09 21:36
Niladri_Biswas8-Dec-09 21:36 
AnswerRe: SQL Copy Table in C# Pin
Paul Voicu10-Dec-09 2:06
Paul Voicu10-Dec-09 2:06 
QuestionINSTEAD OF trigger Pin
Member 47041438-Dec-09 13:34
Member 47041438-Dec-09 13:34 
AnswerRe: INSTEAD OF trigger Pin
David Skelly8-Dec-09 23:43
David Skelly8-Dec-09 23:43 
GeneralRe: INSTEAD OF trigger [modified] Pin
Member 47041439-Dec-09 0:30
Member 47041439-Dec-09 0:30 
Questionsqlserver apostrophe problem. Pin
gerrybrennan7-Dec-09 20:54
gerrybrennan7-Dec-09 20:54 
AnswerRe: sqlserver apostrophe problem. Pin
Ashfield7-Dec-09 20:56
Ashfield7-Dec-09 20:56 
GeneralRe: sqlserver apostrophe problem. Pin
gerrybrennan7-Dec-09 21:14
gerrybrennan7-Dec-09 21:14 
AnswerRe: sqlserver apostrophe problem. Pin
Niladri_Biswas7-Dec-09 21:42
Niladri_Biswas7-Dec-09 21:42 
AnswerRe: sqlserver apostrophe problem. Pin
Nilesh.Kuvar7-Dec-09 23:28
Nilesh.Kuvar7-Dec-09 23:28 

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.