November 1, 2010 at 8:40 am
Chris Morris-439714 (11/1/2010)
Paul White NZ (11/1/2010)
Chris Morris-439714 (11/1/2010)
Nah mate my walking-on-water skills are still underwhelming - don't even drink the stuff, fish f...never mind. Spill the beans! I'll try to understand, promise!SQLCLR, naturally - using Adam's Query Parallelizer π
Ooh you cheat, that's not a fix that's a different method altogether π
How's that cheating?
You never rewrote something from scratch to make it more efficient?
November 1, 2010 at 8:46 am
Ninja's_RGR'us (11/1/2010)
Chris Morris-439714 (11/1/2010)
Paul White NZ (11/1/2010)
Chris Morris-439714 (11/1/2010)
Nah mate my walking-on-water skills are still underwhelming - don't even drink the stuff, fish f...never mind. Spill the beans! I'll try to understand, promise!SQLCLR, naturally - using Adam's Query Parallelizer π
Ooh you cheat, that's not a fix that's a different method altogether π
How's that cheating?
You never rewrote something from scratch to make it more efficient?
Y.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 1, 2010 at 8:08 pm
Chris Morris-439714 (11/1/2010)
Y.
That's a pretty efficient answer right there!
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
November 2, 2010 at 2:04 am
Y
Would have been much better, 50% space saved in the DB, and then remove the signature and you're off to the races! :w00t:
December 4, 2011 at 8:19 pm
Sorry... posted to the wrong thread... post removed.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2012 at 11:14 pm
Dear SQL Kiwi,
Could you please explain little bit of your code, i mean what is happning behiend the scene (I am little week in T-SQL).
Nice code by the way!!
Thanks in advance
July 23, 2012 at 12:14 pm
Re: Super Fast DISTINCT using CTEs - by Paul White
Hi Paul,
How can I extend your technique to multiple VARCHAR columns please?
Any clues please?
Thank you,
Piyush
July 23, 2012 at 3:38 pm
piyush.varma (7/23/2012)
Re: Super Fast DISTINCT using CTEs - by Paul WhiteHi Paul,
How can I extend the technique to multiple columns please?
Any clues please?
Thank you,
Piyush
It IS VERY fast indeed! But only if the number of distinct rows out number those that have duplicates. If you have a lot of duplicate rows, you may want to revert back to a simple DISTINCT or GROUP BY clause.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 61 through 67 (of 67 total)
You must be logged in to reply to this topic. Login to reply