This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Tested on 24 core @ 2.5GHz, SELECT cpu_count FROM sys.dm_os_sys_info; | |
--Microsoft SQL Server 2022 Developer Edition (RTM-GDR) (KB5035432) - 16.0.1115.1 (X64) | |
--I will be using the Estimate Subtree cost to compare each select statement. | |
--Test carried out on E4 with 10,000 rows. It would be stated where more rows were used. | |
--Lookup table is set to 80% of the size of the source table. | |
--tl;dr. | |
--It really depends. | |
--Generally the IN() and JOIN perform similar. Tested to 1m rows. | |
--IN() benefits greatly from appropriate indexes on 0 to 250k rows. More so than a JOIN. Surprisingly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Adrian Sullivan - 2020/12/17 Ninjacat with polygons.*/ | |
/*SVG drawn using Inkscape, export and conversion done using custom code.*/ | |
DECLARE @tt table(id int identity(0,1), label VARCHAR(50), gg GEOMETRY) | |
SET NOCOUNT ON | |
/*Add a point. This point gets layered each time we need to skip*/ | |
DECLARE @g geometry = 'POLYGON((-121.97087 37.372518,-121.97087 37.372518,-121.970863 37.372517,-121.970845 37.372515,-121.97087 37.372518))' | |
DECLARE @i int = 1 | |
WHILE @i <= 660 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Core assumptions: | |
1. All thigs being equal except for CPU usage | |
2. Memory power consumption remains statatic | |
3. Storage power consumption remains static | |
4. Hyperthreading enabled | |
5. Base CPU consumption remains static | |
Refer to https://www.kompulsa.com/much-power-computers-consume/, | |
Base Watt Usage of CPU = =IF([@Basefreq]<2.2,75,IF([@Basefreq]<3.2,60,50)) | |
6. CPU power usage per vCPU calculated as follows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Adrian Sullivan - 2020/08/14 Memories with polygons.*/ | |
/*In loving memory of Hassen Tagari from Johannesburg, South Africa | |
08/20/1972 to 09/08/2020 | |
A legend in the world of racing. Gone too young, too soon. | |
You will be remembered and missed. | |
May your legacy always live on and your soul rest in peace. | |
*/ | |
DECLARE @tt table(id int identity(0,1), label VARCHAR(50), gg GEOMETRY) |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Adrian Sullivan - 2020/08/14 Memories with polygons.*/ | |
/*In loving memory of Hassen Tagari from Lenasia, South Africa | |
08/20/1972 to 09/08/2020 | |
If you read this, please say a prayer for him | |
Verily we belong to Allah, and verily to Him do we return. | |
إِنَّا لِلَّٰهِ وَإِنَّا إِلَيْهِ رَاجِعُونَ | |
ʾinnā li-llāhi wa-ʾinna ʾilayhi rājiʿūna | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Resume of Adrian Sullivan - Senior SQL Database Administrator*/ | |
-- ============================================= | |
-- Author: Adrian Sullivan | |
-- Create date: 2014-02-17 | |
-- Description: Resume of Adrian Sullivan - Senior SQL Database Administrator |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Adrian Sullivan - 2019/11/15 Fun with polygons.*/ | |
/*Thanks to Michael J Swart for all the awesome work on color | |
https://michaeljswart.com/ | |
*/ | |
DECLARE @tt table(id int identity(0,1), label VARCHAR(50), gg GEOMETRY) | |
SET NOCOUNT ON | |
DECLARE @g geometry = 'POLYGON((-121.97087 37.372518,-121.97087 37.372518,-121.970863 37.372517,-121.970845 37.372515,-121.97087 37.372518))' |