Viewing 15 posts - 3,736 through 3,750 (of 7,609 total)
I'd say you get a slight gain by disabling the non-clus indexes first. That's because disabling the index requires removing the rows, which requires some minor logging (of page deallocations,...
September 25, 2017 at 9:47 am
September 25, 2017 at 8:14 am
Or just:
SELECT LEFT(OrigDateString, 4) + ' Q' + CAST((CAST(SUBSTRING(OrigDateString, 6, 2) AS tinyint) + 2) / 3 AS varchar(1))
FROM #TestData
September 22, 2017 at 1:25 pm
Columns lengths have another effect on memory allocation as well. SQL reserves memory prior to processing a table. It determines the amount of memory to reserve partly based on column...
September 22, 2017 at 9:02 am
September 21, 2017 at 10:19 am
September 21, 2017 at 8:16 am
Or:
select *
from lineitems
where orderid in (select orderid from orders where customerid = @CustomerID)
September 21, 2017 at 8:12 am
I think it's very possible that o.type = 'U' would speed it up, rather than using OBJECTPROPERTY.
September 21, 2017 at 8:10 am
Move the error details to a different table. That table could be keyed by the clustering key of this table plus perhaps a sequential error number.
This table should...
September 21, 2017 at 8:04 am
There's a fundamental difference between those queries.
The first is an INNER join to dept, obviously, as explicitly stated, whereas the second is a LEFT OUTER JOIN, although only implicitly.
September 19, 2017 at 9:26 am
IF OBJECT_ID('tempdb.dbo.#index_info') IS NOT NULL
DROP TABLE #index_info;
SELECT TOP (0)
dbschemas.[name] AS schema_name,db_name() AS db_name,
dbtables.[name] AS table_name ,
dbindexes.[name] AS index_name ,
September 19, 2017 at 9:15 am
Along similar lines, I've noticed that many brokerage firms use decimal places for fractional stock holdings, although they display only 3 or 4. Thus, it's often impossible to get an...
September 18, 2017 at 3:34 pm
September 18, 2017 at 11:19 am
September 18, 2017 at 11:16 am
I don't think this is really an issue, as a practical matter. Interest is computed daily, down to the cent (or, worst case, to hundredths of cents), how much the interest is....
September 18, 2017 at 10:00 am
Viewing 15 posts - 3,736 through 3,750 (of 7,609 total)