Forum Replies Created

Viewing 15 posts - 1 through 15 (of 388 total)

  • RE: Find all system objects that have column name = X

    Lynn Pettis - Friday, June 15, 2018 9:34 AM

    MadAdmin - Friday, June 15, 2018 9:23 AM

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Statistics Outdated

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Insert data into a SQL Server Table using Powershell using Invoke-SQLc

    Sue_H - Thursday, February 22, 2018 7:32 AM

    MadAdmin - Thursday, February 22, 2018 6:54 AM

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Insert data into a SQL Server Table using Powershell using Invoke-SQLc

    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

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Should this index be clustered?

    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.

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: SQL agent job disabled

    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 =...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Parse Data in SQL

    Will there always be 3 columns?

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: SQL agent job disabled

    This should be quicker to test than to post?

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: DBCC Check hanging, killed but does not roll back.

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Add SQL 2016 server to an existing SQL 2012 Availability Group?

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Remove IDENTITY property from PRIMARY KEY column

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: SQl Script runs slow running from SQL Agent

    SET options.

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: How to improve performance, when using LIKE (or any other alternative?)

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Script to replace ","

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Query optimization

    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)...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

Viewing 15 posts - 1 through 15 (of 388 total)