Skip to main content

All Questions

Tagged with
2 votes
1 answer
156 views

SSMS User Mapping Slow to Load, or Not Responding

I have been experiencing an issue in SSMS versions 14, 18, and 19, where loading the User Mapping of any given Login takes an age to load, sometimes up to an hour, or just never loads at all and hits ...
L.Moy's user avatar
  • 45
0 votes
1 answer
285 views

How to optimize the SQL query which uses cte, group by and run for 23 hours?

I have a query which first performs joins inside cte and then based on cte join with other table and perform group by with some aggregations and get the top 15 records. This query is taking 23 hours ...
Python coder's user avatar
1 vote
2 answers
98 views

Select * - Why or Why Not?

Is there really any difference between these two queries? SELECT TOP 1000 [COL_1], [COL_2], [...], [COL_n] FROM [database].[schema].[table] SELECT TOP 1000 * FROM [database].[schema].[table] ...
Drew's user avatar
  • 13
1 vote
1 answer
504 views

Clustered Index during data load in MS SQL Server

Until today, I was under impression that it's been considered as a best practice to disable the indexes in sql tables during the data load. And with the fact that one cannot disable the clustered ...
Manish Rawat's user avatar
9 votes
3 answers
640 views

Help performance tuning master/detail (email like inbox) SQL query

I have spent the last couple days searching, watching videos, and I think I've gotten as far as I can get just fumbling my way through. I am looking for more specific direction given my example below. ...
Tim Gabrhel's user avatar
-1 votes
1 answer
68 views

Analysis of queries or stored procedures which ran on the database for last 15 days [duplicate]

We had a site slowdown between 11.57 am and 12:02 pm on 6th Aug 2018, To trace back the queries which were ran our production database (SQL Server Standard Edition 2012) and which might have caused a ...
Sayantani Nath's user avatar
0 votes
1 answer
1k views

Query and index optimization for a table containing 10 million records [closed]

I was trying to retrieve data from a table A to retrieve data for 1 month, which has around 10 million records and 21 indexes built on it, It took me 3 min to retrieve around 20 columns and total of ...
Sayantani Nath's user avatar
1 vote
1 answer
314 views

How to make a test Database grow in size by running transactions to test autogrowth factor?

I have created a test Database instance which is currently having zero activity on it. I have set the auto growth parameter for this DB similar to our actual production DB which is 600 MB per day , ...
Sayantani Nath's user avatar
1 vote
2 answers
100 views

Required values for the performance counters

That will sound ludicrously, by the accident I became a 'DBA' and have to handle one big database around 2TB data. I would like to know what are optimal values for the following performance counters: ...
whd's user avatar
  • 61
1 vote
1 answer
88 views

SQL Server : speed up this query

I have a rather strange situation. There is a table ProductStock which has 2 triggers: one for afterInsert and one for afterDelete both do an insert with the changed value in STOCKDEBUGTRIGGERED ...
JP Hellemons's user avatar
1 vote
1 answer
1k views

SQL server taking too much time in opening properties in SSMS [closed]

I am using sql server express 2008 r2 SP2 from about 2 years. Now a days when i try to check properties of database using sql server management studio it takes too much time(25 to 30 seconds) to open ...
IT researcher's user avatar
3 votes
2 answers
3k views

Why would a query in code be slower than a query in a SQL tool

When we face performance issues with out application, one of the first things we do is try to isolate if the problem is the code, the queries or the database itself. The most frustrating part of this ...
JDT's user avatar
  • 175
8 votes
3 answers
8k views

Can I get SSMS to show me the Actual query costs in the Execution plan pane?

I'm fixing performance issues on a multistatement stored procedure in SQL Server. I want to know which part(s) I should spend time on. I understand from How do I read Query Cost, and is it always a ...
AakashM's user avatar
  • 578
9 votes
1 answer
2k views

How to get accurate query performance?

I'm attempting to improve performance of a stored procedure. When I run the SP, it finishes almost instantly, as if something were cached. I was told to use the following two lines of SQL before ...
O.O's user avatar
  • 678
5 votes
2 answers
4k views

SQL Server query result transfer time over VPN (WAN)

I have a mysterious phenomenon on one remote SQL Server 2005 which I manage and query using SQL Server Management Studio. I connect to the server through a VPN tunnel (provided by an ISP, about 8 MBit/...
splattne's user avatar
  • 242