• bantrim (12/28/2014)


    Jeff,

    Thank you for your reply. I haven't tested the queryout option against the incremental query, but I guess I had assumed that I would run into the same issue as I did in the original query. Certainly, if I could get bcp's speed (or close to) in the query, I would be a happy guy.

    Oh, and StartDttm doesn't have an index on it.

    As for replication...well, it's kind of a long story. We have our EMR actually hosted by another medical organization...one with a very underfunded IS department. I've worked my way down many options, including replication, and my requests for getting anything setup on their end has failed. Actually, I know that TouchWorks updates the OLAP dB by exporting the transaction log from the OLTP environment each day, so the easiest option , I figured, would be to do an initial load and then get a copy of said log each night. No dice...

    Thanks for the suggestions! I'll run a comparison with queryout and report back.

    I don't know if the QueryOut option will actually help against the linked server. Any way you could "go direct" with the BCP? And is there any way that you could "push" an index onto the column so it stands a chance of performance?

    --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)