Forum Replies Created

Viewing 15 posts - 2,161 through 2,175 (of 49,552 total)

  • RE: Indexes on Views - with UNION

    Why?

    Union does that, to do it without union is going to be tricky, probably will need temporary tables or conditional joins (and those will be slow)

    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: proc long running after plan cache

    Yeah, parameter sniffing is parameters or variables. Bad plans is still possible, though less likely.

    I suspect you're going to have to look at the plans, see if they're different...

    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 to find indexes that are larger than 900 bytes

    Luis Cazares (11/4/2016)


    It seems correct, the only issue would be with xml columns, but I'm sure those would be handled differently.

    Not a concern here, since XML columns, like the MAX...

    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: Indexes on Views - with UNION

    I'd also suggest, while you're cleaning out the NOLOCK hints, replace the old-style joins in the WHERE clause with the JOIN clauses.

    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: proc long running after plan cache

    Plans can be aged out of cache, how long that takes is dependant on memory pressure, among other things. Plans also can be removed due to data changes on tables...

    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 find executed time

    Unless you have some custom monitoring in place, you don't. SQL doesn't track that information.

    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: DB compression testing in SQL 2014

    Eirikur Eiriksson (11/3/2016)


    GilaMonster (11/3/2016)


    Neither page nor row compression will compress LOB columns (like XML), so it's not as easy as just ALTER INDEX (and the sp_estimate_data_compression_savings is only going to...

    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: DB compression testing in SQL 2014

    Neither page nor row compression will compress LOB columns (like XML), so it's not as easy as just ALTER INDEX (and the sp_estimate_data_compression_savings is only going to estimate savings from...

    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 detect if force plan fails?

    I assume you mean Query Store (as query hints forcing an index cause the query to fail if the index isn't there)

    There's a couple of columns in sys.query_store_plan that let...

    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: simple question

    scottlackey2001 (11/3/2016)


    is there a way to loop through rows without using a cursor?

    Why do you want to loop through the rows?

    ...to update certain rows.

    Single UPDATE statement with a WHERE...

    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: Adding Product into cart using SP

    And which of those is it not doing or doing incorrectly?

    There's no sample data, so I can't test your procedure out.

    btw, that's a very poor design for the table, it's...

    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: simple question

    Firstly, why are you using a cursor? It's very rare to need one in SQL, and they're slower than set-based code in the vast majority of cases.

    Try set-based code first,...

    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: Adding Product into cart using SP

    What does your procedure not do that you need it to do?

    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 needed

    ramyours2003 (11/3/2016)


    I also need the database growth as well

    You'll find that in sys.master_files.

    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: High Availability Practice

    VMs in Azure work well, not the hosted SQL DB (can't set up availability groups on those)

    How to practice: Set it up with a sample DB (AdventureWorks or WideWorldImporters) and...

    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 - 2,161 through 2,175 (of 49,552 total)