Viewing 15 posts - 31 through 45 (of 65 total)
ScottPletcher (10/7/2015)And, yes, with the appropriate index, the NOT EXISTS becomes better. But not as the tables were presented.
I agree with you. As originally posted, a NOT EXISTS...
October 9, 2015 at 12:14 pm
It looks to me like the following is occurring.
Where there is no Unique index (or constraint) on the HID column (and/or the statistics don't show that the HID column is...
October 9, 2015 at 11:28 am
Kristen-173977 (9/29/2015)
rchantler (9/28/2015)
CREATE CLUSTERED INDEX IDX_hidvals ON #hidvals(hid)
That is not declared as UNIQUE, so not quite the same thing as a PRIMARY KEY's Clustered Index (SQL will add a tie-break...
October 8, 2015 at 7:19 pm
ben.mcintyre (10/7/2015)
The two different ID types reflect only that some tables might...
October 8, 2015 at 4:48 pm
A shotgun in the dark here, but one thing I found in similar circumstances (i.e. adding a Unique index trashes performance):
Do you have any joins that have different data types...
October 7, 2015 at 5:44 pm
For anyone interested, I ran several tests on one of the actual data tables involved, containing 1,526,652 rows of data with 49 columns, containing an average of approximately 470 bytes...
October 7, 2015 at 3:52 pm
I always find it scary that anyone (including myself :-)) is doing direct SQL to "fix" individual records. There are too many ways that a malformed statement can wreak...
October 7, 2015 at 10:24 am
mister.magoo (10/6/2015)
select MBT.refID,
hashbytes('MD5',(select MBT.* from (values(null))foo(bar) for xml auto))...
October 7, 2015 at 9:44 am
To make the situation a little more concrete...
I have developed a lot of data conversion T-SQL to convert data from a third-party database, where in their tables there are NO...
October 6, 2015 at 1:55 pm
As a solution for a single table (where the column list will never change), I can easily write a static expression to convert and concatenate the fields. I have...
October 6, 2015 at 1:23 pm
My bad... :w00t: You are correct that Try_Parse will return 0 for '+' (and also for '-'), as these are effectively treated as "+0" and "-0".
I should have...
September 30, 2015 at 2:25 pm
BTW - that demonstration of the iTVF approach (much earlier above) was very helpful and interesting. 🙂
Honestly, I never considered using an iTVF in that type of situation, but...
September 30, 2015 at 2:06 pm
In addition to Try_Parse, there is a new function Try_Convert, which does what IsNumeric should always have done.
set <output_value> = Try_Convert(<type>, <source_value>);
Try_Convert returns the source_value converted to the desired type,...
September 30, 2015 at 10:35 am
OK OK - I give!!!
I hereby take the No-UDF pledge.
From now on, I will never use a UDF. Instead, I will only write Select statements that include in-line complex...
September 30, 2015 at 10:25 am
Alan.B (9/28/2015)
Alan - minor issue, but the first two fields (CC, NPA) are actually Int values. Making them Varchar(5) introduces some additional overhead in the function, where it then...
September 29, 2015 at 11:00 am
Viewing 15 posts - 31 through 45 (of 65 total)