Skip to main content

New answers tagged

0 votes

Automatic index creation - too many

Use this query to find the index using the most reads: --- Index Read/Write stats (all tables in current DB) ordered by Reads (Query 45) (Overall Index Usage - Reads) SELECT SCHEMA_NAME(t.[schema_id])...
Francesco Mantovani's user avatar
3 votes

Automatic index creation - too many

In analyzing the indexes, some of them differ only in the 'included' columns while the index columns were same This auto-indexing feature can be good in a situation if you don't have any DBA (...
Aleksey Vitsko's user avatar
0 votes

Not able to configure DataSync in azure sql

You are mentioning you have the Hub database and the member (SQL Server database) but there needs to exist a 3rd database the Sync Metadata Database. The Sync Metadata Database contains the metadata ...
Alberto Morillo's user avatar
0 votes

How to get queries executed in Synapse SQL?

--Show everything and everyone with time corrections SELECT CURRENT_TIMESTAMP, s.login_name, r.session_id, r.status, r.resource_allocation_percentage AS rsc_pct, r.command, CONVERT(...
David's user avatar
  • 1
0 votes
Accepted

How do I measure the SQL Database responsiveness

-- Identify long-running queries and wait times SELECT qs.sql_handle, qs.statement_start_offset, qs.statement_end_offset, qs.execution_count, qs.total_worker_time, qs....
warashi nguyen's user avatar
0 votes

Query Store Plan Forcing is Failing with OPTIMIZATION_REPLAY_FAILED

As you've already figured out, the Query Store force plan failures are stored in the sys.query_store_plan DMV SELECT qsp.plan_id , CAST(qsp.query_plan AS xml) AS QueryPlan , qsp....
Zikato's user avatar
  • 5,102
12 votes

View doesn't recognise a change to an underlying table when an existing column is dropped and replaced with one with the same name but as computed

I know a view refresh or alter view will correct this but the column names haven't changed. Geezer You also didn't tell the engine which columns you care about. You said select *. It's been written ...
Peter Vandivier's user avatar
10 votes
Accepted

View doesn't recognise a change to an underlying table when an existing column is dropped and replaced with one with the same name but as computed

When you drop and recreate the column the column is created at the end of the table so the results of the underlying SELECT query have their columns shifted. SELECT T1.*, T2.* FROM ( SELECT ...
Martin Smith's user avatar
  • 85.4k
2 votes

View doesn't recognise a change to an underlying table when an existing column is dropped and replaced with one with the same name but as computed

sp_refreshview Updates the metadata for the specified non-schema-bound view. Persistent metadata for a view can become outdated because of changes to the underlying objects upon which the view ...
Zikato's user avatar
  • 5,102
0 votes

Database Engine Tuning Advisor in Azure

Database Engine Tuning Advisor is not supported on any flavor of Azure SQL Database (DTU-model, vCore-model, Hyperscale, Managed Instance, Serverless). However, Azure SQL can help you to automatically ...
Alberto Morillo's user avatar
4 votes
Accepted

sp_BlitzIndex run against an Azure SQL database

This is because sp_BlitzIndex references the sys.dm_db_index_usage_stats dynamic management view, which tracks the number of times an index has been accessed in execution plans. The retention of data ...
Alberto Morillo's user avatar
1 vote
Accepted

How can I monitor query performance on my Azure read-replica database?

The query store for read-replicas is in preview. More information: https://learn.microsoft.com/en-us/sql/relational-databases/performance/query-store-for-secondary-replicas?view=sql-server-ver16
Ariel Moraes's user avatar

Top 50 recent answers are included