Database Administrators Weekly Newsletter
Database Administrators Weekly Newsletter

Top new questions this week:

statistics are up to date, but estimate is incorrect

When I do dbcc show_statistics ('Reports_Documents', PK_Reports_Documents) I get the following result for Report ID 18698: For this query: SELECT * FROM Reports_Documents WHERE ReportID = 18698 ...

sql-server-2008-r2 t-sql index-statistics  
asked by user1151923 8 votes
answered by Aaron Bertrand 7 votes

Why adding SQL Server user to "Perform volume maintenance tasks" improves the speed of database resizing so much?

If I want to create 5GB database with CREATE DATABASE [test] CONTAINMENT = NONE ON PRIMARY ( NAME = N'test', FILENAME = N'E:\2012\test.mdf' , SIZE = 5529600KB , FILEGROWTH = 1024KB ) LOG ON ( ...

sql-server performance  
asked by Nikolay Kostov 7 votes
answered by Thomas Stringer 17 votes

High PAGELATCH_* and WRITELOG waits. Are they related?

We are seeing very high PAGELATCH_EX and PAGELATCH_SH wait types along with high WRITELOG waits. I've diagnosed the query causing the PAGELATCH waits and can eliminate them by reducing the insertion ...

sql-server sql-server-2008-r2 sql-server-2012 sql-server-2014 database-internals  
asked by Pixelated 7 votes
answered by Shanky 0 votes

Long running DBCC CHECKDB

I am on SQL 2014 Standard doing offline DBCC CHECKDBs (so on a box other than production). For the most part, my process is going pretty quick but for some reason I have this small DB (6gbs) and its ...

sql-server dbcc-checkdb  
asked by Chris Woods 4 votes
answered by Aaron Bertrand 3 votes

Subselect of MAX(Version) takes many minutes, though there are only ~20K records

I have a pretty complicated data model. I can't understand most SQL examples without an explanation of what's being modeled, so I'll try to explain. Mainlines -> Releases -> Overlays -> Calibrations ...

sql-server sql-server-2012 query-performance greatest-n-per-group  
asked by David Krider 4 votes
answered by Paul White 13 votes

Should I use Database Mirroring?

So I have the following scenario on my hands: I have a product database that runs for a specific app, all inserts into the database come in through three separate connections. Recently I have ...

sql-server sql-server-2012 database-mirroring  
asked by MSB 4 votes
answered by Adam Ɓuniewski 6 votes

What is this upside-down silver key icon

I inherited a SQL Server 2005 3rd party server and database to look into to be able to generate reports and dashboards on. On one table, I found a new icon: a blue-silver upside-down key, alongside ...

sql-server-2005 ssms  
asked by Philippe 4 votes
answered by Aaron Bertrand 7 votes

Greatest hits from previous weeks:

How do I list all databases and tables using psql?

I am trying to learn PostgreSQL administration and have started learning how to use the psql command line tool. When I log in with psql --username=postgres, how do I list all databases and tables? I ...

postgresql tools psql command-line  
asked by Jonas 252 votes
answered by Frank Heikens 321 votes

How do I list all columns for a specified table

I'm looking for a precise piece of information in a database which I have no knowledge about. It's a 3rd party product, they are slow on answering some questions, and I know the data is lying inside ...

postgresql information-schema catalogs  
asked by Stephane Rolland 29 votes
answered by bhamby 43 votes

Can you answer these?

Merge-Replication: New column doesn't get replicated down by update command

I do this frequently but all clients have this fault: I added a new column to a table using a SQL statement, which causes the column to be created and added to every publication that uses this table. ...

sql-server sql-server-2008-r2 merge-replication  
asked by Daniel 1 vote

Simple avg query on large table much slower in PostgreSQL than SQL Server

I have a database with three tables items, parameters and measurements in both servers and want to query the measuerment table. But the query is much slower in PostgeSQL (9.4) vs SQL Server (2012). ...

sql-server sql postgresql query-performance group-by  
asked by Staeff 1 vote

I want to move my SQL server from one domain to another

I currently have two domains in my datacenter. Some time ago, it started to cause some inconveniences that I've decided to move my SQL server from one domain to another (where i have most of my ...

asked by user60249 1 vote
Subscribe to more Stack Exchange newsletters

Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3