Forum Replies Created

Viewing 15 posts - 2,911 through 2,925 (of 5,841 total)

  • RE: Improving Delete Query

    DOH!! Coffee clearly hadn't kicked in when I posted! At least I offered up a few improvements ... 🙂

  • RE: Improving Delete Query

    Hardy21 (5/29/2012)


    Lynn Pettis - you are right.

    I have just given one option to change the query.

    It will calculate and store filtered records in temp table so during delete, it will...

  • RE: SQL 2005 to SQL 2012 Migration

    Brian Souder (5/16/2012)


    I have a client with a Point of Sale system that the vendor of the PoS has left on a woefully undersized server. The vendor's recommendation was...

  • RE: PDW Transact-SQL compatibility with SMP

    SQL Kiwi (5/27/2012)


    htiteuf (5/23/2012)


    With PDW AU3, I know stored procedures are supported but some functions in the SMP SQL Server product have not been implemented in SQL Server PDW, Transact-SQL...

  • RE: Bug or problem with a merge statement SQL Server 2008 R2

    Welsh Corgi (5/24/2012)


    SQLKnowItAll (5/15/2012)


    Assuming it is indexed properly, 10 million records should not be an issue. Let's say the join condition is called ID... Just do a select from...

  • RE: Will partitioning help?

    Jayanth_Kurup (5/25/2012)


    While i am enjoying this dicussion I wanted to point out there is a more obvious benefit to partioning than just the elimantion of unwanted partitions. Lock escalation occurs...

  • RE: Multi Processor server maxing out on simple jobs.

    SOOOO many things could be at play here - you likely need to get a professional involved for a few hours to identify what the root cause is. Here...

  • RE: Please I would like to improve the performance of the following function

    Sean Lange (5/24/2012)


    TheSQLGuru (5/24/2012)


    Sean Lange (5/24/2012)


    TheSQLGuru (5/24/2012)


    Actually Grant I don't see even the slightest hint of a question from the OP - it is just a bunch of code. ...

  • RE: Please I would like to improve the performance of the following function

    Sean Lange (5/24/2012)


    TheSQLGuru (5/24/2012)


    Actually Grant I don't see even the slightest hint of a question from the OP - it is just a bunch of code. No request about...

  • RE: Will partitioning help?

    I updated my post to include the connect bug link.

    Here are my findings:

    select MAX(mycol) from mytable_unpart where id<=10

    NC INDEX scan

    Table 'mytable_unpart'. Scan count 1, logical reads 283

    select MAX(mycol)...

  • RE: Will partitioning help?

    Gullimeel (5/24/2012)


    Speaking of "based on testing, not a wild guess" - have you actually TRIED your SELECT MAX(... query on a large partitioned table?

    I had put a real time example...

  • RE: Left Join Killing Me

    chandan_jha18 (5/24/2012)


    TheSQLGuru (5/24/2012)


    The left join on the MIN is going to suck in any case, but these are the real killers here I bet:

    WHERE DsLocationCode = CAST(term.TerminalID AS VARCHAR)

    AND...

  • RE: Left Join Killing Me

    The left join on the MIN is going to suck in any case, but these are the real killers here I bet:

    WHERE DsLocationCode = CAST(term.TerminalID AS VARCHAR)

    AND (sup.SupplierCode LIKE...

  • RE: Please I would like to improve the performance of the following function

    Grant Fritchey (5/23/2012)


    Can you post the execution plan for the query? It's hard to suggest improvements not knowing the structure of your system, tables, indexes, constraints, etc.

    Actually Grant I don't...

  • RE: How to delete in batches ?

    I would have (probably clustered) index on your datetimestamp column. then do something like this:

    declare @error int, @rowcount int

    set @rowcount = 9999

    while @rowcount > 0

    begin

    begin tran

    ...

Viewing 15 posts - 2,911 through 2,925 (of 5,841 total)