Viewing 15 posts - 1,621 through 1,635 (of 7,608 total)
I still have to disagree on REORG if: (1) you can't use online rebuilds AND (2) the table has some serious fragmentation you need to address. It helps if you've properly...
April 28, 2021 at 5:53 pm
and can't afford the time to do offline REBUILDs (which are nasty fast even in the full recovery model), then simply wait until you can.
Not necessarily. You seem...
April 28, 2021 at 5:42 pm
I don't think you should be repeatedly rebuilding 240GB of data. Much of that data must be historical, i.e. unchanging, so there's no need to use vast resources to keep...
April 28, 2021 at 5:37 pm
I've found one other use for REORG. When I've done massive deletes on a table, I've found that a REORG first is sometimes better than a REBUILD first. Follow the...
April 28, 2021 at 4:14 pm
Ooh, yeah, that is rough. Sorry, it must be a royal pain (no pun intended).
When I was a kid, my grandmother used to say, "Never get old." As I got...
April 28, 2021 at 4:10 pm
Perhaps. I was just going by his language that says the columns contain nulls. I don't think he ever used the words "all" or "only".
I was...
April 28, 2021 at 4:09 pm
You stated you're using stored procs. If so, try using a bigint SEQUENCE rather than a guid.
Also, it sounds like you insert multiple rows with the same guid/SEQUENCE. If so,...
April 28, 2021 at 4:02 pm
I think the OP does want to find only columns that are all NULL. Perhaps to remove the column?
April 27, 2021 at 8:46 pm
Would you put your heap table name in the code below, run it, and post the results? That will help determine which, if any, index is best for a clustering...
April 27, 2021 at 8:44 pm
Yes, you could use a JOIN.
SELECT IL.Item,ForecastDemandQty,ForecastDemandMAD,MinShelfQty,MaxShelfQty,
QuantityOnHand,QuantityCommitted,QuantityAllocated,QuantityReleased,ExcludeFromDistraNet,
ITH.TotalShipped
FROM tblimItemLoc IL
LEFT OUTER JOIN (
SELECT Item,SUM(TxQty) AS 'TotalShipped'
FROM IMInvTxHistory
...
April 27, 2021 at 8:32 pm
How long does
SELECT DATALENGTH(varbinmax_col1)
FROM dbo.base_tabletake to run?
Here's the TIME statistics for:
SELECT TOP (200) DATALENGTH(varbinmax_col1)
(200 rows affected)
SQL Server Execution Times:
CPU time = 16 ms, elapsed time...
April 27, 2021 at 6:05 pm
Yeah, the SELECT ... INTO holds certain internal locks on system tables.
Instead, create the table, the clus index (only), and only then load the data into it, like this:
April 27, 2021 at 5:02 pm
I would think using the EXEC ... AT method, should get around that. Try that:
EXEC('SELECT ... FROM dbname.dbo.table_name ... WHERE ...') AT [RemoteServer] April 27, 2021 at 6:16 am
Viewing 15 posts - 1,621 through 1,635 (of 7,608 total)