« first day (2900 days earlier)      last day (1975 days later) » 

12:21 AM
you can tell that's SQL Server @McNets =) Propaganda built in
 
 
3 hours later…
3:46 AM
Bugs me that the subquery isn't aliased
Still a very good effort
 
4:13 AM
@CadeRoux A great while ago I put together a thing doing this using Service Broker. A table had a trigger, which put a message on a queue. Service Broker Activation fired an SP that pushed a network message to a .Net UI app, and the new value showed up on screen. It sounds a bit Heath Robinson when I write it out like that, but it worked.
Were I to try again today I may be tempted to have the trigger call a SQLCLR SP which POSTed to a URL (or whatever the target system supported).
 
 
4 hours later…
7:46 AM
Morning
 
Morning
@EvanCarroll yes, I'm not smart enough to write it for a "real database" ;-) (joking)
 
8:21 AM
Hola
Finally, I am just a hat
 
9:17 AM
@EvanCarroll How about you pause for a few seconds and maybe actually think about what you're typing?
 
@EvanCarroll I see it more as a leveling of the playing field. Oracle, MySQL and MSSQL have eaten up a disproportionate % of systems out there. I find it unlikely that the current trajectory will continue indefinitely.
 
To whom, exactly, would Sinn Fein be swearing allegiance?
 
Good morning, data dabblers
 
morning
 
What Evan never considers is that Oracle and SQL Server have functionality that simply cannot be bettered in the open source world. The High Availability and DR options just do not compare. Any serious business would not be able to use an open source RDBMS for some of its workloads because of this
 
9:31 AM
@Philᵀᴹ The other thing for me is the slow move to the 'X-as-a-service' model. This is likely to start eating numbers from the traditional systems.
 
@Philᵀᴹ Yet ;)
 
These days what you use is much less important than on whose cloud it is located.
 
Apps are designed* differently too
*The majority of agile has never seen a design
 
I think the difference is also on the whole market of external providers that provide added functionality (for products like SQL Server and Oracle), due to being on the market for decades.
 
Phil's also right though that there's no comparison on some of the feature sets. Oracle is still a long way ahead of SQL Server in some areas. Both have an epic head start and dev resources on a scale other players can only dream of.
Plenty of space for everyone to do their own thing.
 
9:48 AM
@PaulWhite Totally agree. RAC as an example
 
I hear mixed reports about RAC, but sure, that's an example.
 
It's a nightmare to setup & admin, but it's rock solid
 
Also in general, the market space is getting bigger, not smaller. The amount of data needing storage is rising expotentially, and the number of businesses needing to use said applications are also rising
 
True.
 
Nobody ever mentions db2 🤭
3
 
9:50 AM
heh
 
Codd was IBM, no?
 
sounds right
 
Does anyone have any decent guides on gauging MAX DOP and cost threshold settings (SQL Server)? I'm really struggling to get to a decent answer for an OLAP system I'm dealing with.
 
I spent my first decade on mainframes & DB2. It would be interesting to go back and do a comparison, knowing what I know now.
 
11:02 AM
Where are all the hatters?
 
@ypercubeᵀᴹ I am hat
 
I went to sleep last night at 5 hats and I'm still at the top of the ladder? Where is everyone?
 
@Zane PITB
@PaulWhite like SQL Server AGs?
@ypercubeᵀᴹ I currently have 6 but only 2 on DBA.SE
 
gbn
11:29 AM
<_ do i have a hat?
nah
@Philᵀᴹ I answered a question on db2 on SO once
 
@hot2use I think the key difference is RAC is multi-master (scale-out writes).
Not my area of expertise though.
 
@PaulWhite My understanding is it's closer to 'true' database level load-balancing, wheras with SQL Server we have to build that into our application design
 
could be
 
Who knows where we'll be in 5/10 years though.
 
or even when 2019 releases
 
11:42 AM
@PaulWhite Absolutely - some really exciting features coming already
 
@George.Palacios retired (إن شاء الله)
 
@McNets Hahahaha
@McNets One day me too
Im relaly interested personally in seeing how the secure enclaves evolves over the next few versions.
 
@PaulWhite I meant more the "I hear mixed reports..." bit, not the functionality itself.
 
oh right, then yeah
 
 
2 hours later…
1:29 PM
@JackDouglas I was able to get one without issue just found it irritating that it doesn't just do it when you do the install.
"I have got a huge query to load a dataset of +- 4000 records." Lol
 
@Zane Maybe the query is huge but the result set is small
 
possible. Doesn't seem that way atm but as usual more details are required.
 
@Zane link to the question?
 
1:49 PM
0
Q: Can this query be optimise for 4000 records

Jelle van LithI have got a huge query to load a dataset of +- 4000 records. This query takes 400 milliseconds to execute. Is there a way to improve this query? SELECT "a"."artikel_id", "a"."mutator", "a"."datum_mut", "a"."artikel_nr", "a"."kode_id" FROM "artikel" AS "a" WHERE ("a"."actief" = 1 AND ...

 
@AndriyM my eyes >-<
 
Yeah... I'm not really what's up with that.
Sorry for the delay @TomV was getting breakfast.
 
2:24 PM
@MichaelGreen Trying to be least invasive to those tables - because it's a different application team - even a trigger into a queue is going to be quite a bit to sell - that's very similar to what I would do with CDC, but it puts a a bunch of stuff in the database as well. I'm currently going for change tracking and polling the change tracking data from an agent job.
This thing also needs to install like snap on any system we upgrade to include these analytics - so just writing the installation process is a big part of the task.
 
2:35 PM
@MichaelGreen The Queen, as part of the swearing in ceremony to take their seats and vote to destroy all that is holy which they actively want to undermine anyway.
In the USA getting "sworn in" used to require putting your hand on the Bible, and swearing to God. I always wondered what kind of person would refuse to simply say "i do" in that circumstance. That kind of person is Sinn Fein. But, all the more, what kind of person wouldn't bullshit that to cast the deciding vote to change the policy? That kind of person is also Sinn Fein.
Get sworn in, cast a vote of no confidence and watch the government you despise crumble. Then refuse to take a seat with the new government.
 
I really wouldn't carry on with this line of conversation, tbh. It's way way too much of a sensitive [political] topic
 
Why would this political topic, out of all the political topics we've talked about be sensitive?
 
@Philᵀᴹ "Any serious business would not be able to use an open source RDBMS for some of its workloads because of this" - for what it's worth, I think there are a number of big companies using MySQL for big parts of their production workloads.
GitHub comes to mind, with their recent failover debacle.
And I think one of the big social media players also uses (or used to use) MySQL.
 
@ypercubeᵀᴹ is there any doc where I can read/learn something about this 'primitive implementation'?
 
"primitive implementation" meaning very basic and likely not exactly what the OP wants.
It's a two-part recursive query, that runs both operations in serial. You could just as well figure out what the ancestor node is, and then run another query to get the descendants but @ypercubeᵀᴹ threw them both into the same query saving a trip to the server for the intermediary step.
 
2:51 PM
@EvanCarroll basically like my answer, but merging both recursive queries?
 
Yes, exactly.
 
@McNets Yeah, our answers are very similar.
 
@EvanCarroll @ypercubeᵀᴹ ok, thanks
 
Does your work if the starting node is a root?
 
I don't test it
 
3:01 PM
@McNets Ah it works because your tree has (node, NULL) rows for root nodes. The OP says his implementation hasn't.
 
@ypercubeᵀᴹ ok, let me check it
and what is the parent_id for root node?
 
@McNets Apparently he only stores edges, not nodes in this table.
 
@ypercubeᵀᴹ i have only one record parent, child 14 17
 
@McNets Yes, exactly. He doesn't have (NULL, 14)
@McNets in your fiddle, the function definition has:
  WHERE
      t1.id = 7
Shouldn't that be:
 
yes, I've changed it
 
3:08 PM
  WHERE
      t1.id = node_id
@McNets Not in the fiddle!
 
I need to change this too ` WHERE
parent_id IS NULL;`
@ypercubeᵀᴹ now, it works assuming root id has the min value of all nodes
 
I don't like it.
I prefer the IS NULL version. Just add that it works only when the data have (NULL, rootnode) rows
The example data set has 12 as parent of 2, 11 as parent of 7.
You could add a "level" calculation in the get_parent query and then return the row with the largest level.
@McNets somethign like this: dbfiddle.uk/…
 
3:26 PM
@ypercubeᵀᴹ yes, thanks
 
4:12 PM
@jadarnel27 I'm thinking financials, though. Where transactions (money) disappearing is simply not an option
 
@Philᵀᴹ Ah, good point.
 
 
2 hours later…
6:22 PM
Anything to suggest that this fella is talking about stored procedures and not just querying the data ad hoc. If so I was thinking of answering and explaing how the predicate in the literal will use the hisogram where as the local variable will use the calculation based on density.
2
Q: Is there any difference between a predicate using a literal value or a parameter value when that value will always be the same?

JeremyWeirI have a query that always filters on a status, is there a performance benefit of one of these ways over the other? (This is in the context of an ad-hoc query. The datatype of UserStatus is int) ... AND UserStatus = 1 ... or DECLARE @userStatus int = 1 ... AND UserStatus = @userStatus ... ...

 
6:33 PM
I'm doing it anyway It should be helpful and I like writing about cadinality estimation.
 
6:47 PM
Anyone care to play how many spelling errors did Zane have?
nvm I just pasted it in word.
 
@Zane I fixed a post of yours yesterday. I estimate 2 per paragraph
Which is why we need Andriy
 
@TomV lol I'm going to just start pasting into word and mach sure things are good. I have terrible spelling and struggle constantly to spot area's where I've fat fingured keys as well.
 
^ fingered
Haha
I kid I use spell check all the time myself for typos
 
Half the time @Lamak is giving me a hard time for my broken spelling and gramar and it's not even his first language. lol
 
I use it all the time when typing French
It's easier to just type without accents and then right click the squiggly words than it is to alt-whatever to get the correct accent
It's not a matter of not knowing how to spell it even its a matter of lazyness (let's call that efficiency)
 
 
2 hours later…
9:02 PM
doesn't seem to be on my end when testnig, however always good to have second review, thank you — knightbob472 1 min ago
Odd this guy isn't having problems and the code seems to be working fine he's just trying to get a review. What's the rule on this kind of question? Isn't there a code review stack exchange site already?
Sure enough there is. I'll flag it and we'll see what the mods think.
 
@Zane yup
 
Hmm I can't flag it to that site only SO. I'm assuming it's because I'm not a member of codereview.stackexchange.com but I don't know for sure.
 
9:17 PM
@Zane Each site has a limited number of "duplicate targets" for the migration flag. I think SO is the only one configured for dba.se.
Up to 5 sites, I think.
 

« first day (2900 days earlier)      last day (1975 days later) »