Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Timeout when creating a view

$
0
0

Hi, apologies if this has been posted in the wrong place, new to SQL Server and these forums!

We have a large-ish transaction file (around 57million rows currently) which i'm trying to aggregate to a weekly level to aid with reporting, so attempting to create a view in SQL Server Management Studio but getting the below error:

'Tmeout Expired. The timeout perioed elapsed prior to completion of the operation or the server is not responding'

below is the SQL for the view:

SELECT        TOP (100) PERCENT dbo.D_TIME2.RET_YEAR, dbo.D_TIME2.RET_MONTH, dbo.D_TIME2.RET_WEEK_ID, dbo.F_DSTSKU.DOOR_ID, dbo.F_DSTSKU.DOCTYPE, dbo.F_DSTSKU.SELLTHRU_TYPE, dbo.F_DSTSKU.CURRENCY, dbo.F_DSTSKU.SKU_ID, SUM(dbo.F_DSTSKU.SALES_UNITS) AS Units, SUM(dbo.F_DSTSKU.SALES_VALUE) AS Value
FROM dbo.F_DSTSKU
LEFT OUTER JOIN
dbo.D_TIME2 ON dbo.F_DSTSKU.TRANSACTION_DATE = dbo.D_TIME2.DATE
GROUP BY dbo.D_TIME2.RET_YEAR, dbo.D_TIME2.RET_MONTH, dbo.D_TIME2.RET_WEEK_ID, dbo.F_DSTSKU.DOOR_ID, dbo.F_DSTSKU.DOCTYPE, dbo.F_DSTSKU.SELLTHRU_TYPE, dbo.F_DSTSKU.CURRENCY, dbo.F_DSTSKU.SKU_ID
ORDER BY dbo.D_TIME2.RET_YEAR, dbo.D_TIME2.RET_MONTH, dbo.D_TIME2.RET_WEEK_ID, dbo.F_DSTSKU.DOOR_ID, dbo.F_DSTSKU.DOCTYPE, dbo.F_DSTSKU.SELLTHRU_TYPE, dbo.F_DSTSKU.CURRENCY, dbo.F_DSTSKU.SKU_ID
I've checked through all the properties i can find, and query execution is either set to unlimited or 65,000 seconds, but i'm getting this error popping up after about 30 seconds. Any ideas?


Viewing all articles
Browse latest Browse all 7129

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>