Viewing 15 posts - 991 through 1,005 (of 2,645 total)
Nicely done. My only concern would be that since the DBA won't allow the OP to create the fnTally function, will they also forbid the OP from calling a...
July 22, 2020 at 2:18 am
Here's my attempt:
;with TestData as
(
SELECT *
FROM (VALUES ('A[kfg]'),
...
July 22, 2020 at 12:21 am
But, yes, depending in which way your index is disorganised, REORGANIZE can mean a lot of operations, as it performs a bubble sort of the file.
I don't think...
July 20, 2020 at 3:06 pm
Hi
Thanks a lot.
I've run your edited query. but its cost was 51% against last improved query that I sent in my last post. And Logical Read grows up for...
July 7, 2020 at 1:20 pm
I've rewritten your query to use EXISTS instead of IN. Removed the UNION ALL and change the comma separate table names to INNER JOIN. I think it's a better starting...
July 5, 2020 at 2:29 am
Although the SQL online documentation shows an example of using WHERE with a comparison operator, I don't understand how it is being used below. I understand the notation "columnName"...
July 4, 2020 at 3:48 pm
Why the not?:
if not exists ( select 0 from sys.sql_logins where name = @szlogin)
Also I think you might need:
EXECUTE AS LOGIN='sa';
before the line: if...
July 4, 2020 at 1:38 pm
.
July 2, 2020 at 11:34 pm
You really need to look at the code. It could be, for example, that large temporary tables are being created for the processing. You could get around this by using...
July 2, 2020 at 9:40 pm
Okay I will try creating these indexes and see if it benefits. Since, the query isn't completing in its entirety I have no clue of the optimizer suggesting an...
July 2, 2020 at 9:18 pm
You have not indexed any of the temporary tables, maybe you should? Do you have any specific recommendation you can provide?
Thank you so much for all the help...
July 2, 2020 at 6:52 pm
You have an OUTER APPLY (aliased c2) in the query but in the WHERE clause of the main query you have
AND D.LiveTable = c2.TableName
So why is it an OUTER APPLY...
July 2, 2020 at 5:22 pm
Yep, I agree with you Jonathan AC Roberts, but what if the number of columns is dynamic? With version 1 it has 3, version 2 has 2, version 3...
June 30, 2020 at 5:46 pm
Not sure that an index will help anything since there is no WHERE clause or ORDER BY. No matter what index you put on there, it is going to...
June 30, 2020 at 4:13 pm
Viewing 15 posts - 991 through 1,005 (of 2,645 total)