Forum Replies Created

Viewing 15 posts - 9,826 through 9,840 (of 49,552 total)

  • RE: Query of 100 mil rows with multiple parameters

    ChrisM@home (3/4/2014)


    Less rows per page because of data duplication doesn't come without cost.

    What data duplication?

    There's always some overhead and someone always has to do the sums, calculate the cost-benefit.

    Not in...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Query of 100 mil rows with multiple parameters

    ChrisM@home (3/4/2014)


    1. How often do you change a clustered index on a production db?

    I do fairly often, but then that's what I do mostly (database tuning on various badly performing...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Query of 100 mil rows with multiple parameters

    ChrisM@Work (2/28/2014)


    Secondly, your ordinary index has most of the columns of the clustered index as INCLUDE columns. This is unnecessary because nonclustered indexes contain the cluster keys - they're already...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Transaction Log Question Related to Log Shipping and DR (What's in a T-Log?)

    If it's a SQL login you have to make sure that the SID for the login is the same on both servers, otherwise the database user won't reference the login...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Log growing in SIMPLE Recovery Mode

    sqlbuddy123 (3/4/2014)


    Use this query ..

    SELECT [log_reuse_wait_desc]

    FROM [master].[sys].[databases]

    --WHERE [name] = N'DB_Name';

    That's just going to give a list of all the log reuse for...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How to check for a stored procedure

    IF EXISTS (SELECT 1 FROM sys.procedures WHERE name = 'ep_change')

    PRINT 'Procedure exists'

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How to shrink log in 2008 r2? URGENT!!!!!!

    psamyn (3/4/2014)


    Strange, why does ssms then suggest this line when you apply this on a lig file when you choose for the option shrink file.

    Because SSMS is a poorly written...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Database Triggers to prevent large DDL transactions

    To be honest, no.

    The kind of trigger you want isn't really an option. By the time a trigger which can tell the rowcount fires (like the one above), the data...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Syntax advise please

    Then there's something going on that you're not telling us about, because there are no floats around in case statements I wrote for you and if the columns are CHAR(8),...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Syntax advise please

    Did you try mine?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: How to shrink log in 2008 r2? URGENT!!!!!!

    psamyn (3/4/2014)


    This should do it also.

    DBCC SHRINKFILE (N'<DATABASE_LOG_FILE_NAME>' , 0, TRUNCATEONLY)

    TruncateOnly has no meaning when applied to a log file shrink, it's an option for data files, and shrinking the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Syntax advise please

    Try this (a bit simplified and cleaned up)

    SELECT DISTINCT

    c.iCustomer_id ,

    c.sCustomer_number AS CustomerNo ,

    ...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Web snatching single user mode

    Disable the login or shut down the web app.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Syntax advise please

    If you comment out the CASE in both the select and the where does the error go away?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Finding unused stored procedures

    Sushil Dwivedi (3/3/2014)


    Will it help

    Slightly. It'll tell you what procedures have been run since the last server restart and still have their plans in cache. It can't tell you that...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 9,826 through 9,840 (of 49,552 total)