Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Increasing efficiency of a SP using an Excel Sheet

Author  Topic 

Orbison
Starting Member

14 Posts

Posted - 2010-02-25 : 06:08:38
Hi All,
I'm using SQL Server 2008 express and have a SP which processes 21254 records in 3 seconds. I had a look at the Execution Plan and the estimated operator cost is 0%, estimated subtree cost is 3.5778975.
The SP is using a remote scan to read a spreadsheet which accounts for 94% of this cost. Just wondering if there is any way to increase the efficiency of the SP when reading Spreadsheet's directly? There's approx 10,000 rows on the Spreadsheet

INSERT INTO #InputTable
(INPUT_PRODUCT_ID)
Select Product_ID
FROM OPENROWSET ('MICROSOFT.JET.OLEDB.4.0',
'EXCEL 8.0;DATABASE=C:\General\General\Excel sheets\Products.xls;',
'Select Product_ID FROM [SHEET1$]') AS Product_ID


Thanks
   

- Advertisement -