Skip to main content

All Questions

Tagged with
0 votes
1 answer
85 views

why CREATE DATABASE FOR ATTACH too slow in parallel?

For testing purposes, I created 15 different .mdf files that are essentially the same file (300MB) but with different names. When I use CREATE DATABASE FOR ATTACH for a single database, it takes about ...
Obscure_33's user avatar
1 vote
1 answer
86 views

What is the impact on an index when I am widening a key varchar column

One of the central tables in my database has a varchar(25) column named EmployeeID. This column is used within a compound index and is likely the most used index in our system. We got an enhancement ...
Aheho's user avatar
  • 163
-1 votes
1 answer
67 views

How do I measure the SQL Database responsiveness

I am load testing my web app which is Azure App Server + Azure SQL Database. I am looking at the the Azure data dashboard metrics as we load test it and most measures (DTU percentage, CPU percentage, ...
David Thielen's user avatar
2 votes
0 answers
60 views

SQL Server Underestimating cardinality on a Filter operator in a Left Anti-Join

I am tuning a query which is slow, I have narrowed the root of the problem to be at the very beginning of the execution plan, where SQL Server makes a bad estimate on a WHERE IS NULL filter that ...
SE1986's user avatar
  • 2,000
4 votes
2 answers
178 views

Index seeks and predicate push down

I have a query of the following form: IF EXISTS ( SELECT 1 FROM ( SELECT RowID, OETID FROM @InMemoryTableTypeTable i UNION ...
Dan Def's user avatar
  • 165
0 votes
0 answers
89 views

High number of Latch Waits, is it a problem, and how to investigate?

We have reports of performance issues on one of our applications. I tried to have a look for anything obvious, but I'm an Oracle DBA, and my SQL Server knowledge is pretty limited - we don't have any ...
Carlovski's user avatar
  • 113
-3 votes
2 answers
102 views

Why is the performance of these two equal queries so different? [closed]

This specific query has an average return time of 3:40 minutes SELECT ROUND((SUM(ENF.TEMPO) / 24 / 60), 2) AS BROCHADEIRA FROM ( SELECT SZ9030.Z9_RECURSO AS COD_REC, ((ISNULL(TEMPO.TEMP, 0) + ...
Gabriel Pereira's user avatar
0 votes
0 answers
38 views

I increased my NDF files from 3 files to 7 files. How to re-distribute the data across MDF and NDF files?

I have a big database that uses 1 MDF files and 4 NDF files. The MDF file is placed in a 2TB disk and NDF files are placed in 500GB disks separately. I set the MDF file to be unlimited, while the NDF ...
Affan Widyan's user avatar
0 votes
1 answer
56 views

Why adding a where on a well-know set of result increase the process time? [closed]

On SQL Server, if I do this query: select top(10) * from MyTable order by id desc it tooks only some ms to execute. (please note, every rows contains a field Message with value "Some Fancy ...
markzzz's user avatar
  • 243
0 votes
0 answers
26 views

Purely in performance terms, how do CONTAINS([MyCol], 'foo') and [MyCol] LIKE '%foo%' compare?

Consider CONTAINS([MyCol], 'foo') and [MyCol] LIKE '%foo%'. Assume the best possible indexes on [MyCol], whatever those may be (at minimum, we need a unique key and a full-text index). I know that the ...
J. Mini's user avatar
  • 545
1 vote
2 answers
93 views

Recommendations to reduce table rows [closed]

I'm looking for some recommendations when dealing with tables with large number of rows. I have a table which has around 1.5 BILLION rows. Assuming there is a column ref_id. There could be 300K rows ...
Emmanuel Ponnudurai's user avatar
0 votes
1 answer
69 views

Metadata query slow on one specific database

I have quite a weird problem (who doesn't). Our ETL Software scans source databases to claim object data. It extracts information from INFORMATION_SCHEMA about objects (tables and views) SELECT t.[...
LonelyDBA92's user avatar
0 votes
0 answers
112 views

T-SQL Temp Table Performance Issue

At my current contractor job, I have come across something I have never seen before in SQL performance. There is a report that takes most of the day, or the entire day to run. Can return about 5 ...
user avatar
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
3 answers
346 views

Why Do Primary Keys on Temp Tables Improve Performance Much More Than On Table Variables?

Many of my reports are essentially pivot tables. I take a set of big tables and transform each table individually so that a particular column (let's call it CaseID) that wasn't a primary key in the ...
J. Mini's user avatar
  • 545

15 30 50 per page
1
2 3 4 5
140