OPENROWSET or OPENDATASOURCE - Situation preferences / Performance differences?

  • Hi,

    I'm not asking what the difference between them is, because I think I get it after some time spent reading. I'm looking more for what situation people would use one over the other, and if/when there are any real performance differences to note. Is one better than the other for Excel files? I would appreciate any thoughts that aren't links to Google or BOL. 😉

    Thanks

  • Due to popular demand, I decided to test each of these queries. I used a .xlsx file with 215,337 rows, and 15 columns.

    SELECT * INTO dbo.ImportTest

    FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0',

    'Database=\\plaus42\Sample\SampleRepository\j3688810_Cycle 13.xlsx;

    Excel 12.0 XML;HDR=YES;IMEX=1', [sample$])

    Ran for 2:24

    SELECT * INTO dbo.ImportTest

    FROM OPENDATASOURCE('Microsoft.ACE.OLEDB.12.0',

    'Data Source=\\plaus42\Sample\SampleRepository\j3688810_Cycle 13.xlsx;

    Extended Properties="Excel 12.0 XML;HDR=YES;IMEX=1"')...[sample$]

    Ran for 2:20

    The results mostly make me think my server kind of stinks :angry:

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply