Forum Replies Created

Viewing 15 posts - 35,611 through 35,625 (of 59,099 total)

  • RE: WHERE...IN vs JOIN

    Mad Myche (12/21/2010)


    Thank you for the great information. I created the Tally Table (mine took 93,516 ms) and created that function. The performance gain was on the order of ~350%....

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: SSIS - ForEach From Variable Enumerator

    Phil Parkin (12/23/2009)


    Jeff Moden (12/22/2009)


    Heh... I probably wouldn't use SSIS for such a thing. I damned sure wouldn't use a script for this. T-SQL would do the job just...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Hidden Formatting Troubles with STR() (SQL Spackle)

    dlinetsky (12/21/2010)


    Thanks Jeff, good to know. I personally have always used this syntax: REPLICATE('0',10-LEN(SomeNumber)) + CAST(somenumber AS VARCHAR(10)), which has always worked well for me, but appears to be...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: GetDate() or CURRENT_TIMESTAMP

    vinothraj (12/21/2010)


    I dont know why its gets differs.. attached screenshot.. by the by, my machine is i5

    Which code did you use for that test? If the answer is that...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: DateDiff on Consecutive Rows

    SQLkiwi (12/20/2010)


    Wildcat (12/20/2010)


    How could a NOLOCK hint to the target table on the DELETE or UPDATE statement? Make no sense to me.

    Precisely. It's just an oversight in the parser:

    --...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: GetDate() or CURRENT_TIMESTAMP

    vinothraj (12/20/2010)


    Jeff Moden (12/17/2010)


    vinothraj (12/16/2010)


    I've checked elapsing time for each of those and got approximate time is less for current_timestamp than getdate().

    Is current_timestamp better? i think so....

    Please post the test...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: WHERE...IN vs JOIN

    Ok... since I don't subscribe to SQL Server Magazine, I can't get to the actual code listings but I cobbled together a non-RBAR function that uses the Tally Table instead...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Filtering by column

    bitbucket-25253 (12/20/2010)


    This will allow you to view specific columns by name, or by data type along with their associated table name.

    SELECT so.Name AS 'Table',sc.Name AS 'Column'

    FROM sys.sysobjects...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: GetDate() or CURRENT_TIMESTAMP

    fabricioaraujorj (12/20/2010)


    Jeff Moden (12/17/2010)


    Heh... I use GETDATE() for several reasons but these are my favorites... It has fewer characters to type, I've used it forever, I don't believe in the...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: WHERE...IN vs JOIN

    Mad Myche (12/20/2010)


    I believe the function we are using is the one described at MSDN Sql 2000: Building the Fn_Split() Function, but due to the rules here I cant paste...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Under Appreciated Features

    James Stover (12/20/2010)


    One thing I dearly miss from the Query Analyzer days is Ctrl-B. That combo would highlight the results pane bar and then you could move the pane up...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Pause the query

    Agh! Gotta remember to read down. Remi already suggested what I just did.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Pause the query

    ravisamigo (12/20/2010)


    Dear All,

    Is there any option to pause the query and resume later if it takes more time to finish?

    Please advise.

    Thanks and Regards,

    Ravichandra.

    IF somecondition is true WAITFOR TIME 'hh:mm:ss'

    Of course,...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Fastest way to move a database from 32bit to 64bit server

    DKlein (12/20/2010)


    It is going from a raid 5 to a raid 5, from box to box. From 32bit (publisher) to 64bit (subscriber).

    Thanks again,

    DK

    Now would be a good time to...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Expected salary for DBA with 3 years exp.

    SKYBVI (12/20/2010)


    this thread is 15 months old..

    the figures would change now as that time it was recession and

    now the market is growing very fast..

    Regards,

    Sushant

    DBA

    West Indies

    heh... didn't even look. ...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 15 posts - 35,611 through 35,625 (of 59,099 total)