Viewing 15 posts - 1 through 15 (of 388 total)
Just wondering what these stats would be used for.
Cos if stats are outdated then that implies they are not being used, since queries would start the process of autorecomputing...
May 25, 2018 at 9:36 am
February 22, 2018 at 8:43 am
using DBATools
$datatable = Import-Csv C:\temp\customers.csv | Out-DbaDataTable
Write-DbaDataTable -SqlServer sql2014 -InputObject $datatable -Table mydb.dbo.customers
Much better than foreach
February 22, 2018 at 6:54 am
If doing a lot of deletes, then cluster the table.
When deleting from a heap, the empty pages dont get deallocated.
So your table grows forever.
November 15, 2017 at 8:59 am
IF you dont care about job history for this job that has been disabled
THEN
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-purge-jobhistory-transact-sql
sp_purge_jobhistory { [ @job_name = ] 'job_name' | | [ @job_id =...
June 9, 2017 at 10:13 am
Nope
Rollbacks are singlethtreaded.
They take longer to rollback.
Try looking at this post.
Paul Randall says that you have to let it complete the rollback to the snapshot that...
June 9, 2017 at 9:07 am
I found this at below link, so no.
An upgraded primary replica can no longer ship logs to any secondary replica whose SQL Server 2016 instance that has not yet been...
December 7, 2016 at 2:27 am
Add column with temp column name as nullible.
Copy values from ID to temp column.
Drop PK and ID column
Rename temp column to ID.
Change column to not nullible.
Create PK on New ID...
December 7, 2016 at 2:04 am
Have a look at the disparity in reads when using a variable or a literal, and option recompile.
You could use this trick to make it quicker.
set statistics io on
use AdventureWorks2016CTP3
GO
declare...
December 6, 2016 at 9:42 am
declare @schema sysname='person',@objectName sysname ='person'
Declare @string nvarchar(4000) ='update '+quotename(@schema)+'.'+quotename(@objectName)+' set '
select @string=@string + quotename(c.name) +'= replace('+quotename(c.name)+','','','' ''),' from sys.columns C
inner join sys.objects o on o.object_id = c.object_id
inner join sys.schemas s...
December 6, 2016 at 9:14 am
If there is a temp table in the query batch, these are known to give you recompiles [ Edit : Depending on the difference in stats].
So I suggest adding option(recompile)...
December 6, 2016 at 6:23 am
Viewing 15 posts - 1 through 15 (of 388 total)