Laden...
|
|
|
|
|
|
Question of the Day |
Today's question (by Greg Larsen): | |
SQL Server 2019 Feature | |
Which feature introduced with SQL Server 2019 improves the performance of large analytic queries? | |
Think you know the answer? Click here, and find out if you are right. |
Yesterday's Question of the Day (by Greg Larsen) |
Memory Grant Feedback Memory grant feedback tunes the memory requirements for batch mode queries beginning in 2017 and row mode queries beginning in 2019. In which situations will this feature be helpful? (More than one answer is correct) Answer: When SQL Server incorrectly calculates the estimated row size, Incorrect cardinality estimates Explanation: The answers are 1 and 4. One reason that the memory grant may be incorrect is when SQL Server incorrectly calculates the estimated row size. This might be due to having varchar(MAX) columns that are NULL in the query. SQL Server may also incorrectly estimate the number of rows due to a bad cardinality estimate and then also incorrectly size the memory grant. Answer 2 is incorrect because SQL Server will disable memory grant feedback for the query if the memory grant must be changed over and over. Answer 3 is incorrect because it doesn’t matter if there is a table variable involved. References: Intelligent Query Processing - https://docs.microsoft.com/en-us/sql/relational-databases/performance/intelligent-query-processing?view=sql-server-ver15 Right Sizing Row Mode Query Memory Requirements - https://www.red-gate.com/simple-talk/sql/performance/right-sizing-row-mode-query-memory-requirements/
|
Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2017 - Administration |
SSMS: How to save multiple resultsets from same query into 1 result or 1 file? - I am submitting an official request for DBA of certain servers to run a script on those servers and give me back the resultset. However the script (the actual script is 3 times larger than the attached and returns 20 more results) returns multiple results, so a DBA will not be copy/pasting each resultset into […] |
Availability Groups for failover AND mirror - I've got a 2-node failover AG setup. I want to add a 3rd node to be used as a reporting server. That could be read-only, but has to be available all the time. For reasons beyond my control, I can't use replication. The database has no primary keys indexes (3rd-party software design). So, it all […] |
SQL Server 2017 - Development |
SQL Server Fragmentation- Defragment - The table consist of around 2 billion record on an average there are 1000K inserts happening daily , we see some slowness in recent days , so while checking the table we saw some fragmentation information. Above is the query i used against my dataware database and observed some fragmentation in the index for some […] |
SQL Server 2016 - Administration |
Creating DB diagram - Hi, I was planning to create a DB diagram of a user DB to better understand the relationship however when I right-click on database diagram (please expand the user DB to see this option) I see an alert window saying 'This database does not have one or more of the support objects required to use […] |
SQL server 2016 SP2 error - Hi All, am trying to update my 2016 SQL server instance to the SP2. the current version is Microsoft SQL Server 2016 (SP1-GDR) (KB4505219) - 13.0.4259.0 (X64) Jun 15 2019 19:20:12 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows 10 Enterprise 6.3 (Build 18363: ) SP2 setup file : SQLServer2016-KB4549825-x64.exe for some […] |
SQL Trace Not Capturing Database Events....EXEC, INSERT, UPDATE... - I want to see what Stored Procedures are run when users enter data in a 3rd party product we use. I would also like to see INSERTS & UPDATES to tables. I set up a trace that I have used elsewhere with success, but in this case, it's not capturing any of the events I […] |
SQL Server 2016 - Development and T-SQL |
Help with T-SQL - I have a web interface for managing tool rentals for our chapter members. I have a display page that will list all of the tools we have and to flag those tools that are currently being rented out to include the expected return date. The important thing is to know which are available and which […] |
How to optimise the table performanace (90 lacs records) - Hi, I have a table with 5000 users along with 6 years of attendance data. If I want to retrieve user data from the table it takes time to load. Table Structure Usercode, Rosterdate, Shift code, AttendanceCode Case 1 If i want to retrieve the shift information from 1-jun-2020 to 10-jun-2020 for 5000 users, would […] |
Help in Date spans for continuoes and regular dates spans - Hello all, I would like to take input scripts and generate output data as given below. output is expected as if member is continuously enrolled without any gap in enrollment get min and max and if there is enrollment gap leave as is. for any given member there are no multiple spans just leave as […] |
Administration - SQL Server 2014 |
OPENQUERY giving wrong result on linked server - I have setup linked servers on my SQL Server and choose Oracle as a linked server. SOMETIMES, When I run the query below under the SA username, I get different result. However when I run under my own username I get correct result. I Can't understand this anomaly. The below query returns only one row. The difference occurs in […] |
Sum of all Memory Clerks and Total Server Memory (KB) - I am trying to understand the memory management of SQL Server. I have a Windows Server 2019 on virtual environment with 64 GB of RAM. I also have SQL Server 2019 installed with Max Server Memory 59776 MB. By using the following query I found the list of all memory clerks: SELECT [type] AS [ClerkType], […] |
SQL Server 2012 - T-SQL |
? ON Parsing an XML Field - Hi, I know I've asked this before and got a good link , but can't figure out how to parse this XML field. I would usually parse something like Data.Value('Data/.../..) But not sure how to parse out say "Case" from the field below(SqlParameters)? |
SQL Server 2019 - Administration |
How do I count the objects (tables,views,indexes) for a database? - Is there any simple script which I can use to count the user objects in a database? Reason is, I'm planning to do an upgrade from SQL 2008R2 to SQL 2019 & my plan is to take a count of the objects on the old SQL and 2019 so I can compare and see if […] |
Anything that is NOT about SQL! |
SSC Traffic Declining ? - Are there fewer posts & replies on SSC these days ? It seems like it. Or are they just spread over more sub forums of the various SQL versions ? |
COVID-19 Pandemic |
Daily Coping 16 Jun 2020 - Today’s tip is to find the joy in music today: sing, play, dance, or listen. http://voiceofthedba.com/2020/06/16/daily-coping-16-jun-2020/ |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Laden...
Laden...
© 2024