Viewing 15 posts - 121 through 135 (of 2,651 total)
all those are not available to use within functions of views - so only within batch SQL or within a SP - and with regards to 3 - yes the...
August 22, 2024 at 2:51 pm
Attached is the SQL query plan.
There are two main queries. The first uses a date parameter and the second doesn't. The second query is much higher cost that the...
August 22, 2024 at 12:27 pm
use PlanExplorer to scramble the names - https://www.solarwinds.com/free-tools/plan-explorer
that will replace any object name (db, table, column) with object1, object2 and so on - but it will leave intact the remaining...
August 22, 2024 at 12:07 pm
can you give us the actual explain plan with both the 3 conditions and just 1 condition - as well as the definition of the view.
likely this is joining multiple...
August 22, 2024 at 11:21 am
This is the query with the plan (names have been changed):
DECLARE @DateColumn DATE = '2024-07-01';
DELETE s
FROM [Schema].TableName s
INNER JOIN #WorkingTable q
ON q.Column1...
August 22, 2024 at 10:18 am
dup post
August 20, 2024 at 8:19 pm
replace your code with
if ([string]::IsNullOrEmpty($OrgID) -eq $true)
{
write-host "Null found"
...
August 20, 2024 at 8:18 pm
I know you are after how to estimate X - that is not really a good way to go as there are way to many unknowns, and without looking at...
August 20, 2024 at 9:01 am
you said
Schema.TableName is partitioned by date. There are typically 30 million rows per date partition.
#WorkingTable contains 500k records. We receive a continual set of records throughout the day (60 million...
August 19, 2024 at 5:30 pm
as I said above you don't necessarily need a tool to generate data - it all depends on what your production data is and what can be copied down without...
August 19, 2024 at 4:02 pm
likely the standard method of inserting into a new table with the column being calculated at that stage, and then one of 2 options
1 - truncate source table (remove any...
August 19, 2024 at 8:48 am
did you try this?
WHILE @@FETCH_STATUS = 0
BEGIN
SET @tableName = QUOTENAME(@tableName);
-- SET @paramDefinition = N'@tblName NVARCHAR(255)'; -- not needed for...
August 16, 2024 at 7:45 pm
as that table is partitioned, and depending on the volume you are deleting, it may be faster to switch out the partition of that date to a staging table, and...
August 15, 2024 at 1:46 pm
Personally I approach these type of changes by first identifying which executions take the longest, then which queries within that take the longest looking through their ACTUAL explain plan and...
August 15, 2024 at 11:02 am
with a few exceptions Production data can easily be manipulated to remove/scramble any PII or similar data at which time none of it can be used if it is leaked...
August 12, 2024 at 6:15 pm
Viewing 15 posts - 121 through 135 (of 2,651 total)