Forum Replies Created

Viewing 15 posts - 3,856 through 3,870 (of 49,552 total)

  • RE: IF Statement with Insert

    It's a parse-time error. The *entire* batch gets parsed and bound before any part of it gets executed. The parser cannot execute code. Hence the error is thrown.

    Oh, and 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: limitation on number of tables joined

    etl2016 (1/13/2016)


    Is there a limitation on how many tables can be JOIN-ed?

    Nope. You can join as many tables as the resources on your server (memory most likely) allow. 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: Simple Query but not easy to tune

    Wait, wait, wait, what????

    WHERE (1 = 1 OR EXISTS (SELECT * FROM AB WHERE AB.Customer_A_Id = A.A_Id AND (AB.Number LIKE @T AND 1=1)))

    1=1 is always TRUE.

    TRUE OR <anything> is TRUE....

    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 reduce huge CXPACKET & LATCH_EX (ACCESS_METHODS_DATASET_PARENT) wait times?

    (2) probably won't help. 50 is already high.

    (1) might help, but probably not all that much. With 16 cores, probably 8 is a decent starting point, but don't expect it...

    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: Updates to fragmented indexes

    I would say no.

    Logical fragmentation affects the performance of large range scans from disk. Emphasis Large and Disk.

    An insert is not going to require that SQL do a large range...

    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: Is there any log file for stored procedure ?

    No.

    If you want something like that, you'll have to either set up a trace that logs stored procedure execution, or add code to each stored proc that logs its execution...

    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: VMWare with SQL Server (sharing memory)

    JamesMorrison (1/11/2016)


    Or don't worry about it and spin up all the guests that everyone wants to their hearts desire?

    Not unless there's free resources on the host. If your host has...

    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: Are the posted questions getting worse?

    Steve Jones - SSC Editor (1/11/2016)


    Grant Fritchey (1/11/2016)


    Continuing my role as the harbinger of death, Ziggy Stardust is no more.

    One of my favorite songs. Although Bauhaus actually did it...

    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 Help

    Table definitions and sample data please.

    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: Backup Testing, theory and practice

    Barkingdog (1/11/2016)


    What is your approach to checking backups?

    Automate it.

    You shouldn't be doing it. The junior shouldn't be doing it. A job should be restoring each backup to a test server,...

    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 count work at backend Level.

    COUNT(<any constant>) means count the rows in the resultset. If you say COUNT(<any constant>) FROM Table, then it returns count of the rows in the table.

    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: Joining 2 Tables with Or condition

    Sure, with the same general idea.

    t1 INNER JOIN t2 on t1.Col1 = t2.Col2 OR t1.Col1 = t2.Col3 OR t1.Col1 = T2.Col4

    Don't know what the performance will be, but I can't...

    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 filter monthly data from a yearly data file ?

    Rankerg (1/10/2016)


    I am not sure WHAT ELSE I can provide, I already mentioned the file has 140 columns / fields

    Hugo already explained.

    So if any tables are involved (I assume...

    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: cant find download link for SQL server 2005 (64 bit)

    Please note: 4 year old thread.

    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: Execution Plan reuse

    Question: Dropping any index on the table, whether it is used by the query plan or not.

    MSDN: Dropping an index used by the execution plan.

    Dropping any index on the table...

    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 - 3,856 through 3,870 (of 49,552 total)