Viewing 15 posts - 991 through 1,005 (of 2,648 total)
Try TOP(1) in a CROSS APPLY.
e.g.:
SELECT DISTINCT
m.ID,
m.Type,
...
July 27, 2020 at 2:36 pm
Hi I Did not mentioned earlier, This is my Live OLTP Database/Tables. So On top of the adhoc Queries there are some another maintenance jobs as well as some...
July 23, 2020 at 11:51 pm
Another thought - do you NEED columnC in your FinalTable_bedeleted? Probably speed things up a little bit by only pulling the ID's out of FinalTable, no?
I hadn't actually looked...
July 23, 2020 at 12:17 am
You haven't provided information on what indexes are on the tables.
Ideally FinalTAble will have a clustered index on Id and no other indexes.
I would then try creating clustered indexes on...
July 22, 2020 at 7:10 pm
I have a Use case like.
We tried disabling all the index but still it's taking too much time. Even we have 5-8 hours maintain-ace window. We don't have partitioned...
July 22, 2020 at 4:59 pm
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
Viewing 15 posts - 991 through 1,005 (of 2,648 total)