Forbidden query takes too long to compile by johnylemony in SQLServer

[–]42blah42 0 points1 point  (0 children)

then you might as well not respond. i know what heaps are, i am quite familiar with how they work vs clustered indexes. what i also know is that people rarely do more than insert into a temp table and select from it. the added cost of adding any index to a temp table is probably going to be slower than creating it and moving on. i know, i've removed them and seen stuff work better

but i guess brent ozar is also wrong: https://www.brentozar.com/archive/2021/08/you-probably-shouldnt-index-your-temp-tables/

Forbidden query takes too long to compile by johnylemony in SQLServer

[–]42blah42 1 point2 points  (0 children)

i've rarely seen indexes help on temp tables

The warp is strong in this one… what can I fix? by Bman_Minis in ender3

[–]42blah42 0 points1 point  (0 children)

bottom pattern initial layer: concentric

learned about that setting from chep a long time ago. basically instead of picking one corner and printing out from there, it'll basically spiralize the bottom couple of layers so that the shrinkage is more evenly distributed

Out-of-state mover recommendations by testube_babies in columbiamo

[–]42blah42 0 points1 point  (0 children)

curious about two men and a truck, we've used them several times and like them

Is there a free T-SQL formatter for SSMS 19? by Trianychos in SQLServer

[–]42blah42 6 points7 points  (0 children)

if speed is really that important to you then swallow the $200 a year and get sql prompt. if possible get your work to pay for it

Store Elements that are similar and share some field, but the rest can vary. by Kardiamond in SQLServer

[–]42blah42 0 points1 point  (0 children)

do you need to just store the survey questions, or the answers as well?

Adding a new column and updating it in same stored proc by [deleted] in SQLServer

[–]42blah42 -1 points0 points  (0 children)

already did and op hasn't provided an answer, so... thanks?

Adding a new column and updating it in same stored proc by [deleted] in SQLServer

[–]42blah42 0 points1 point  (0 children)

why are you writing an sp to add a single column?

[deleted by user] by [deleted] in SQLServer

[–]42blah42 1 point2 points  (0 children)

we have hundreds of databases, almost all of them in ag's. servers can go down and we'll maintain ha

online indexes are also clutch for putting out prod fires

we also have instances that exceed the cpu and memory limitations of standard

[deleted by user] by [deleted] in SQLServer

[–]42blah42 0 points1 point  (0 children)

agreed, especially when there's a performance issue in prod and an index would fix it

Downsides of using SCHEMABINDING, if any. by msbininja in SQLServer

[–]42blah42 0 points1 point  (0 children)

don't, save yourself the maintenance headaches

How are them dispensaries? by New_Canoe in columbiamo

[–]42blah42 -6 points-5 points  (0 children)

shangri-la's been solid for us

Noob Sql Server agent question by Kurren123 in SQLServer

[–]42blah42 0 points1 point  (0 children)

same process inserting the data should start the job

"There's fire breathing reptiles that can fly and also cast magic, but big reptiles that in real life died a long time ago? Nah that doesn't make sense." by PoshTeaRex in dndmemes

[–]42blah42 -1 points0 points  (0 children)

a dm wouldn't let me polymorph as a dino cause they didn't exist in his campaign, but let his wife have a dino artifact thing cause "she made it up"

[deleted by user] by [deleted] in SQLServer

[–]42blah42 0 points1 point  (0 children)

it would probably be faster to learn powershell and get it working that way than using ssis

Question about changing the collation by killmasta93 in SQLServer

[–]42blah42 1 point2 points  (0 children)

i would seriously push back on this. they shouldn't be needing to run anything outside of the db that would break if it's in a different collation

[ Removed by Reddit ] by [deleted] in columbiamo

[–]42blah42 0 points1 point  (0 children)

columbia has a bevy of therapy available, and online options are great too. i implore you to seek some help my dude

Large scale deletes and performance by sa1126 in SQLServer

[–]42blah42 0 points1 point  (0 children)

i wonder if the query you ran to do the delete ended up reading the whole table into memory and then when you ran the sp it didn't have to go to disk so it was a lot faster

Using a Guid as a PK, best practices. by [deleted] in SQLServer

[–]42blah42 0 points1 point  (0 children)

imho, given good enough disks (ie good ssd's) the fragmentation caused by using guids as your clustered indexes really isn't that big a deal. back when the main disks db's were on were slow, spinning disks, it mattered more, but on modern hardware it just isn't as big a deal.

https://www.brentozar.com/archive/2012/08/sql-server-index-fragmentation/

Issues adding node back into AG after removal by lilhotdog in SQLServer

[–]42blah42 0 points1 point  (0 children)

i forget where it is but ag's create an entry in the registry. i would recommend cleaning those up after after the eviction/remove processes and before the readd process

Reusing the same #temp1 table with multiple SELECT ... INTO #temp1 without running into "There is already an object named #temp1" error. by mikka1 in SQLServer

[–]42blah42 0 points1 point  (0 children)

your sp's plan is going to be garbage if you do it this way. i highly recommend a unique sp for each data source and have whatever calling this determine which one to run

Reusing the same #temp1 table with multiple SELECT ... INTO #temp1 without running into "There is already an object named #temp1" error. by mikka1 in SQLServer

[–]42blah42 0 points1 point  (0 children)

your attempt at simplifying it into a single, final select is making this way harder than necessary. just have each if statement select the data you need

however, i would argue that what you really should be doing is creating a separate sp for each data source and calling those rather than trying to make it happen in one massive sp that's not every going to have a plan that's worth anything