« first day (2236 days earlier)      last day (2627 days later) » 
00:00 - 18:0018:00 - 23:00

@AaronBertrand Thank you kindly.
@AaronBertrand Would you say that my narrow use case to get source table column outputs on INSERTS is also unsafe?
 
eww.
> I have been recommending that - for now - people stick to their tried and true methods of separate statements.
 
@ErikE I'm a big fan of consistency. Because I don't like to use MERGE in cases where I am at least skeptical of its safety, I'd rather not use it anywhere. I mean, we were able to solve that particular problem before MERGE came along.
 
That's kind of like what I do. Except I recommend they use ON CONFLICT and move to PostgreSQL if they need advanced functionality like UPSERT.
We're not that different. =)
 
eww why, Evan? Did you actually read the article? MERGE is largely just syntactic sugar around separate statements anyway (except they left a few, err, holes when stitching it together).
I also wonder how many just bat merge statements around thinking they don't need to deal with isolation semantics because it's "one statement"... then they wonder why they get race conditions etc.
 
12:17 AM
There are no race conditions that I'm aware of in PostgreSQL regarding ON CONFLICT.
 
@AaronBertrand What do you recommend for performing an INSERT and returning the generated identity values in a way that can be correlated to the original rows?
 
I can't speak for SQL Server and that terrifying list of drawbacks which has convinced their experienced users to avoid the functionality. I use ON CONFLICT all the time. Never gotten in a bind with it.
 
@EvanCarroll ok, we're not talking about PG
 
@EvanCarroll Evan, I think it's time for you to start using the "reply" functionality by clicking on the little arrow to the right of each post. It's hard to follow you sometimes because it's not always clear what message you're responding to.
 
@ErikE That depends, is the IDENTITY column really the only key?
 
12:19 AM
@ErikE @AaronBertrand The only alternative to that that I'm aware of is cursors.
 
@AaronBertrand That's a good question. Let me look at my two instances.
 
I don't use the mouse much =( my bad.
s/much/almost ever/
though I have like 3 of them connected.
 
@ErikE and where are the original, multiple rows you're inserting coming from? Can you use a TVP?
@ErikE And how/why do you need the identity values after the insert? What are you doing with them? Something a trigger can't do?
 
@AaronBertrand Hmmm I only have one of these. There is a partial single-column scoping key, but the system that generates the row only does so through very complicated logic, and there's no particular second value to give any key-based identity to the row besides that it's the next one in the series. (This is a system producing delta messages to send to another system.)
 
@ErikE I'd have to see it in action to understand, don't do well with word problems especially after the kids are finally in bed.
@ErikE I can't tell you to not use MERGE - if that works for you, go nuts. I can only tell you what I would do, and it's not that. I'd do whatever I would have done in 2005.
 
12:23 AM
@AaronBertrand I can use a TVP. Right now I bulk insert to a temp table, then insert to the real table.
 
If you can put an MVCE somewhere I can have a think on it.
 
@AaronBertrand The identity values are used to update the Id value in C# code so that the newly-DB-saved objects can be presented to the user, and if sending is desired, the Ids can be used to re-fetch them from the database and work with them.
 
Paul would probably tell you to just go ahead and use MERGE. He's a lot less chicken little than I am.
I don't trust it in general, and again with the consistency, since I know there are scenarios I can't use it, I don't want to use it elsewhere.
 
@AaronBertrand I can just match on every value inserted, but I'd like to avoid returning the entire rowset. It seems wasteful and clunky.
 
@ErikE I have a hard time believing the only way to uniquely identify a row is by comparing every single column.
 
12:26 AM
@AaronBertrand There's a JSON payload that could be used, I guess--you're right that it could be that one column. That feels just as awful.
 
But again, I'd have to see an example to understand.
No, I am definitely not suggesting JSON (or XML, or other overkill garbage)
You know that the OUTPUT clause is not just available for MERGE, right?
 
@AaronBertrand Oh, and more than one message can be generated at once for the same scoping key and other column values. Truly, the only guaranteed difference between 2 rows could be in the JSON payload and the identity value.
 
@AaronBertrand But only MERGE allows you to output the source columns while inserting rows, to provide mapping between the source and the target.
 
@AndriyM Right.
 
Think of a set of related tables. A parent table, a child table, a grandchild table. You need to import those tables preserving the relationships contained in them. What we are doing currently is using a cursor on the parent and for each parent row inserted we get the generated value and open another cursor on the child to use the generated value to substitute the source reference, and for every child row there's another cursor to insert grandchild rows in the same manner.
 
12:29 AM
@AaronBertrand May I post the MERGE query here or should I create a new question?
It's 39 lines long but well-formatted
And very, very simple
I'll trim it
 
CREATE TABLE #morth(a char(1), b char(1));
INSERT #morth(a,b) VALUES('x','y'),('p','q');
CREATE TABLE #floob(id int IDENTITY(1,1), a char(1), b char(2));
INSERT #floob (a,b)
  OUTPUT inserted.id, inserted.a, inserted.b
  SELECT a,b FROM #morth;
GO
DROP TABLE #floob, #morth;
 
MERGE dbo.ReportingMessage
USING #NewReportingMessage input ON 1 = 0
WHEN NOT MATCHED THEN
   INSERT (ItemId, SerializedMessage)
   VALUES (input.ItemId, input.SerializedMessage)
OUTPUT input.InputId, inserted.ReportingMessageId;
 
@AaronBertrand So you are suggesting inserting the source ID into the target table then. A redundancy that saves consistency :)
 
The key being OUTPUT input.InputId so I can easily correlate back to the original C# object and update its ReportingMessageId value
 
CREATE TABLE foo AS SELECT x, chr(x+64) FROM generate_series(1,10) AS t(x);
CREATE UNIQUE INDEX ON foo(x);
INSERT INTO foo (
  SELECT y+5, chr(y+64+5)
  FROM generate_series(1,10) AS t(y)
) ON CONFLICT (x) DO UPDATE
  SET chr = EXCLUDED.chr
  RETURNING x;
 
12:33 AM
@AndriyM I don't know that we're talking about the same use case. Erik says he takes values from a temp table and inserts into a single table which generates an identity column. Where am I inserting a source ID? There is no source ID.
@EvanCarroll I know you like flexing your PG prowess but we're not talking about PG
 
Just trying to show a friendly comparative example.
 
For what purpose? Do you think you'll convince Erik to switch to PG?
 
God I hope so. I honestly think he deserves better.
 
@EvanCarroll It's not really helping at all. And I don't see how your example does anything like return 2 values, the correlating ID and the newly generated ID.
 
@AaronBertrand I assumed either #morth.a or #morth.b served as the source ID, but yeah, we may be talking about different scenarios.
 
12:34 AM
I could show how you would do it in Oracle, too, but we're not all trying to be Jehovahs
 
He knows what he wants. It's unfortunate when the stack doesn't offer it.
 
@EvanCarroll Evan, I knew nothing about you before today, and I have just started down the road to becoming the opposite of your fan.
 
ErikE it does, the RETURNING x
 
/facepalm I'm out
 
@EvanCarroll Well, good that postgres can do that, but I'm talking about SQL Server, here, so it's not really helpful.
 
12:35 AM
Thanks for ruining yet another conversation Evan
 
@EvanCarroll Presumably, x is some complex type with more than one value in each row? Awesome for postgres...
 
No, it's the ID of the table I created with foo.
 
@EvanCarroll I don't need the ID. I need two values, the ID AND a value from the original row that wasn't inserted. You're not even answering the right question, here.
@EvanCarroll Look at the OUTPUT clause of my MERGE statement above.
 
So if you run that query, the table gets populated with (1,A)..(10,J). That updated extends the ASCII table with (6,F)..(15,O) and returns the col (x) for the inserted and updated rows which in this case is (6,15) the rows affected.
 
@EvanCarroll I need TWO values returned PER INSERTED ROW. Can you do that!?!?!
@EvanCarroll And one of the two values ISN'T INSERTED.
 
12:40 AM
Yes... RETURNING (x, col)
Then you would do SELECT FOR UPDATE in a CTE before hand and return that (which should work).
this isn't necessary, as Aaron said, I'm just out to tackle the tunnel vision in a friendly way. If it's not appreciated, I'll stfu. And you're welcome to tell me directly whenever. =) friendly competition isn't always welcomed on the proprietary side of the aisle. Not like inspiration is going to overwhelm Microsoft with patches.
 
@EvanCarroll I am not the kind to sour on people quickly. I usually do everything in my power to give people the benefit of the doubt. But damn.
@EvanCarroll Can I tell you indirectly and you'll take the hint, or must I become loud and obnoxious?
 
In MSSQL can be used ROW_NUMBER() OVER(ORDER BY min(field) desc) without a GROUP BY?
 
@EvanCarroll ON CONFLICT may be a PostgreSQL equivalent of MERGE but the point here is not about resolving conflicts on INSERTs. It's about getting mapping between the source ID and the generated target ID. The source rows are being inserted into another table where each gets a generated ID. The problem is to get mapping between the source ID (which doesn't take part in the inserts) and the target ID. It's easy for a single row but not so much for a row set if done in a single statement.
 
@EvanCarroll Now you're saying I have tunnel vision because I use the database servers my company provides me to work with?
@EvanCarroll Or in what way is tunnel vision present in this discussion?
@AndriyM Thank you Andriy, that is exactly it. I remember you helped me a month or two ago with this, and you remember perfectly.
 
@AndriyM if you care to see how it's done. I'd love to show you.
 
12:45 AM
@AndriyM I've built a system that can handle a year of retrospective data and hundreds of thousands of message comparisons within a few minutes, and I take seriously the need to do things in sets and as efficiently as possible so the system stays fast.
@EvanCarroll In postgres, presumably?
 
@EvanCarroll I think it was Erik who was interested. I'm mildly curious at this point, no more than that.
 
@EvanCarroll I have a 10-year old who is in this phase where he is constantly showing off his knowledge. And admittedly, he is very smart and has a lot of knowledge for a 10-year-old. But he is frequently making himself look like a fool because being 10, he doesn't actually have much experience in the world and over-rates his own ability, experience, and knowledge. I keep trying to guide him gently to be less impressed with himself.
@EvanCarroll I'm sure it's just a phase my son will grow out of, but in the meantime, when he acts like he knows something and ends up actually arguing with me on a topic he doesn't truly understand, or gives a confident but completely misplaced answer, it becomes really frustrating. My son has the excuse of being 10. What's your excuse?
3
 
@AndriyM love to show you. Give me a second I'll whip it up and we'll see how it looks in SQL Server. I'm also mildly curios, and we can all be friends right?
I've got an elephant and you've got a window with four panes or something? no hostility...
 
@EvanCarroll I don't think we can all be friends. The more you talk the more ticked I get at you and your actions. I feel quite hostile right now. You're going to show us how it's done, eh? In SQL Server? Let's see it.
 
I'm hostile to the idea of hostility.
 
12:49 AM
I like your style. =) FUUUUU hostility.
 
@EvanCarroll I take it as hostile to come in and start showing off, or at best offering useless alternatives in the wrong DBMS.
 
I'm human, though, and my emotional side can (and does from time to time) get the better of me. I'm consciously against hostility, but sometimes I can't help feeling it. (Not feeling towards anyone any at the moment, for the record.)
 
@EvanCarroll And to offer queries that show a failure to understand the original need.
@EvanCarroll And to persist even after prompting to see what's being asked for.
@EvanCarroll So, still waiting to hear what you meant by tunnel vision. You think I have tunnel vision? In what way?
 
Messed it up. Serves me right for posting something not well thought through
 
@EvanCarroll And what do you mean by competition? How is this a competition? I'm trying to solve work problems. How are you fighting against Microsoft by posting queries irrelevant to the discussion that interfere with me getting my work done? Trying to do some postgres evangelism? All you're doing is associating in my mind assery with PG.
@AndriyM I never saw it so you're safe with me.
 
1:03 AM
@ErikE I meant to fix my earlier message, missed the grace period for editing, so it became a new (basically duplicate) message, which is why I deleted it.
Doesn't matter. The point I made is clear enough, it's just clumsy because of the wrong word order. :) Tickles my OCD
And it's "gets the better". Oh well.
 
@ErikE it doesn't require it.
@McNets yes, sure. Oops, sorry, no. I missed the min(field) .
 
hrm. does min(col) work in anything in an order by like that?
Answer: not in Pg.
 
1:59 AM
SELECT
    a,
    min(f) as min_f,
    ROW_NUMBER() OVER (ORDER BY min(f) DESC) AS rn
FROM
    t
GROUP BY
    a ;
is a valid SQL query, that's all.
In SQL Server, Postgres, Oracle.
Maybe in MySQL, too. Some day.
You could even have the same row number expression without a GROUP BY. But it would be trivial and not useful for anything.
SELECT
    min(f) AS min_f,
    ROW_NUMBER() OVER (ORDER BY min(f) DESC) AS rn
FROM
    t ;
rn would be 1, always, in this 2nd example.
 
@ypercubeᵀᴹ sure, he said without a group by..
I was wondering if anything supported min() in ORDER BY without the group by.
erg
that's what I wanted to say
I fudged that
 
@EvanCarroll They all do. See the 2nd example above.
 
ahh
now that's cool
not useful, but nifty
 
@AndriyM It's not even that. MERGE has ot more functionality. ON COFLICT only does UPSERT, nothing more.
The Postgres devs decided to implement only that and left MERGE for the future - if they ever do it.
 
2:16 AM
that being that merge can delete rows?
 
3:17 AM
0
A: Non-integer primary key considerations

Evan CarrollUsing ltree If IPV6 works, great. It doesn't support "ACC". ltree does. A label path is a sequence of zero or more labels separated by dots, for example L1.L2.L3, representing a path from the root of a hierarchical tree to a particular node. The length of a label path must be less than 65kB,...

 
3:37 AM
@ErikE - I don't mind your "too many words" - I love the English language and love the tiny minutiae of subtle meaning. An anecdote is "a short account of a particular incident or event, especially of an interesting or amusing nature". I wrote "This is an anectode, not an answer" (10k+ users only) in response to an answer that started with "My experience ...", continued with "there have been many times" and ended with "I'm not sure".
This clearly is an anecdote. If the OP had edited his answer to show proof of any of the claims made in his answer, I would have acknowledged that in a comment; and depending on the results, may have even upvoted his answer.
 
4:21 AM
0
A: SQL: Storing Formatting in Data

Max VernonFormatting is meta-data. If you include formatting in a column, you are mixing meta-data with data, which is clearly not a great idea. I'm not a theory-guru, but I'd bet that is listed somewhere as a no-no. For your specific example, which I know is only an example, you may actually want to st...

@EvanCarroll - I suppose there is a killer way to do that in PostgreSQL ?
 
 
2 hours later…
6:08 AM
@JoeObbish Just out of curiosity, when you say "string aggregation" do you mean string concatenation (e.g. for xml path) or min/max(string) aggregation? And are we talking about worse performance with columnstore, or just no better than with rowstore?
@AaronBertrand @ErikE For that particular example, yes I would simply use MERGE. It is one of the few (only?) truly legitimate uses as far as I am concerned.
Simple MERGE statements are often not problematic on small sets. The problem is that simple statements on small sets have a habit of morphing into something more complex over time, which is where the MERGE edge cases creep in.
@AndriyM Fixed :)
 
 
2 hours later…
7:54 AM
@ypercubeᵀᴹ @ypercubeᵀᴹ thanks and sorry for the delay, it was related to this question: stackoverflow.com/questions/42287109/count-over-mssql-to-mysql
 
 
2 hours later…
9:27 AM
@ypercubeᵀᴹ I am tempted to get banned from meta with a comment 'You are clearly an idiot'. Also, adding a very professional to the room. Instead, I'll just keep ignoring here and now elsewhere, too. Slightly complicated because we both are involved in @TomV.
already lost too much time on worthless ****
 
Oooo, I missed something. On seconds thoughts: No, I didn't.
Morning :-)
 
9:53 AM
@McNets I can't see how your query will work.
select *, count(*)
doesn't look right.
 
@dezso Sorry, I won't do that again
 
@TomV what did you do?
 
@ypercubeᵀᴹ the deliberate misspelling of PostgreSQL I did a couple of times, although not recently, is what @dezso is alluding to
But I'm glad I was sleeping & not caring last night reading back
It was clearly already heading in the wrong direction when I joined chat yesterday so I left fairly quickly after posting that .gif
 
10:09 AM
the .gif wasn't bad.
 
10:28 AM
@PaulWhite Thank you!
 
@AndriyM No worries.
 
Seen on the interwebs today ...
*And if you ever feel like your job is useless, remember there is someone whose job it is to install turn signals in BMWs.*
3
 
@ypercubeᵀᴹ Yes, you are right. I just meant to acknowledge that there is similarity and to point out that the issue wasn't really about upsert.
 
I always read 'upsert' as 'upset' on the first pass.
 
@EvanCarroll Thanks. It's still not the same problem, I'm afraid. A picture is worth a thousand words, so when I have time I'll try and come up with an example to illustrate what I and Erik meant.
 
10:43 AM
@PaulWhite Read Evan's question then ;) dba.stackexchange.com/questions/164615/…
 
And Max's comment
 
> Now, let's say I want to UPSET, 5 rows.. A few colliding a few new rows..
@AndriyM Yes, sorry if you already knew. Wasn't sure.
 
@ypercubeᵀᴹ It's all right
To me the word "upsert" sounds a little absurd.
2
 
@ypercubeᵀᴹ yes, It was late and OP doesn't supply too much info. I'll edit.
 
@ypercubeᵀᴹ ha ha!
 
10:56 AM
@AndriyM you mean it sounds a little like "absurd"?
 
Sounds like a bird to me.
 
@ypercubeᵀᴹ Yes. It was a joke trying to conflate the fact that "upsert" was a made-up word that might look/sound awkward (=absurd) to those unfamiliar with the DBA jargon, with the similarity of its pronunciation to the word "absurd". The joke didn't really work well, which I think was because I failed to get the grammar right to convey both meanings as intended. (The grammar worked for one meaning but not exactly for the other.)
There. JEAGL is in our hearts :)
4
 
11:11 AM
@JackDouglas cool. Planning on making an alternative to sql fiddle?
 
@ypercubeᵀᴹ you are evil
@Philᵀᴹ ?
 
6
Q: A fiddle designed for dba.se

Jack DouglasSQLFiddle has been an essential tool and a great complement to dba.se for a very long time, but it has gone downhill a bit in the last year or two. I have also wondered for some time what a 'fiddle' designed specifically with dba.se and markdown in mind might look like, and over the last few day...

 
@Philᵀᴹ yes - I'm even hoping to improve on the original, but the main target for now is something that works
 
danke schön
 
bitte
 
11:17 AM
I think it is good enough right now to use, albeit with a lot of room for improvement still
19
A: Avoiding multiple `or` expressions

Jack DouglasYou might prefer something like this: select * from foobar where (subject,term) in ( ('STAT','111') ,('STAT','222') ,('ENGLISH','555') ,('COMM','444') ,('COMM','333') ,('S...

I never understood why SQLFiddle didn't cache results tbh — the large majority of visits probably didn't ever need to hit the database back-ends
 
@JackDouglas is the code on github or elsewhere?
 
GitHub would be good
 
Happy to put it up there, though it will mean publicly admitting I use PHP :)
3
 
@JackDouglas No longer an issue now :)
 
Better than admitting to using PCP
 
11:23 AM
@JackDouglas As do I
 
Am somewhat concerned about security issues though — using XE for Oracle is inherently dangerous. My only mitigation at moment is that the VM DB backends are stateless and can be rolled back in case of problems.
@Philᵀᴹ that makes me feel better
@Philᵀᴹ what's a good license, MIT?
 
@JackDouglas ouch
:D
(while I am happy to not to have to code in PHP anymore, it is still not (necessarily) a bad choice for such projects)
 
indeed
 
@JackDouglas the only thing you have to be careful with is not to print any MySQL errors on user screens :D
 
@JackDouglas how much donations you think you need to keep it running without it costing you too much
 
11:36 AM
Hola, adding an index on a 100k row join table is going to take seconds, right? ~50mb in size, MySQL 5.5.54, so I'm not sure if that version supports adding indexes without locking.
 
@TomV $0. Donations would be nice, but I think I have to be committed to a certain level of 'making it work' even if I don't get any — but if I do get any, it'll make a difference to how much time I spend on the project. I've asked a contact at SE to contribute and have reason to think they might, but we will see.
@Sean clone the table and test it?
 
@JackDouglas I was thinking of chipping in for possible VPS costs or something
 
That's very kind, even having a couple of $1/month donations might help encourage SE or other companies into helping :)
 
@JackDouglas Sound plan. Cheers
Yup. Took about a second.
 
@Sean and join dba.se!
wrong. proof: dbfiddle.uk/…
pleased with how easy that was to test :)
 
11:45 AM
@JackDouglas there was a 1000 limitation on something, wasn't it? About something else or has it been removed?
 
@ypercubeᵀᴹ I think so on VALUES, but there is no VALUES clause here, just an in-list
 
@JackDouglas there you go
 
@JackDouglas According to this, for IN: community.oracle.com/thread/235143
 
@JackDouglas aha! nice, didn't know!
 
11:48 AM
I'm confused now
 
@JackDouglas Why?
 
"A comma-delimited list of expressions can contain no more than 1000 expressions. A comma-delimited list of sets of expressions can contain any number of sets, but each set can contain no more than 1000 expressions." docs.oracle.com/database/122/SQLRF/…
 
Did you see the answer by gordi in that SO q you linked?
 
I have now :)
not quite sure how to reconcile that with the wording in the docs though — or maybe it makes sense, idk
 
@JackDouglas The wording is confusing but I think it means:
( (1), (2), ..., (1000) ) is allowed up to 1000.
( 1, 2, ..., 1000 ) is allowed up to 1000.
( (1,1,...,1), (2,2,,...,2), ..., (y,y,...,y) ) has no restriction for y as long as the lists have no more than 1000 values
@JackDouglas, irrelevant to that, does INSERT ... VALUES ... allow more than one row in Oracle? I thought it didn't.
 
11:57 AM
@Grimaldi you may be interested to read the discussion in here from chat.stackexchange.com/transcript/message/35497672#35497672 onwards - my reject message on your edit was not correct: I was right that the 1000 limit doesn't apply, but my reason was wrong.
@dezso thanks!
@ypercubeᵀᴹ that's right it doesn't. The VALUES limit reference is a typo I think - Grimaldi was always referring to an in-list limit
 
@JackDouglas Yes
 
@JackDouglas I asked because the other answer in that q, uses it.
 
@JackDouglas happy to PayPal some funds too
 
Seems like they thought it was a SQL Server question. Their suggestion looks alright - and could be corrected
 
@ypercubeᵀᴹ yes, good spot — I reckon you should just edit that, it's incidental to the answer
@Philᵀᴹ thanks, though I don't have Paypal, just this
 
12:10 PM
@JackDouglas Pledged
 
@JackDouglas I edited. There is a somewhat shorter syntax for inserting multiple rows but I don't remember by heart. So I used the from dual thing
 
@ypercubeᵀᴹ that's fine. You could use CTAS and UNION ALL, but what you've done is readable and works, thanks :)
Cheers @Philᵀᴹ :)
 
CTAS? What's that? ;)
 
12:43 PM
@PaulWhite It's something they have in strange, foreign lands. You don't have to worry about it.
 
Phew!
 
@PaulWhite Now we have brexit they won't be letting any more of those nasty folks in, either.
 
I thought brexit was about exporting the City of London's financial services :)
 
Good that I have already sneaked in ;)
 
I'll freely admit I have no idea what brexit will actually mean for UK border control in practice. Maybe no one does at this point.
But surely there'll be a high bar for anyone from CTASland.
 
1:00 PM
This runs currently on Azure V12 — FPar 7 mins ago
 
@PaulWhite That's what I'm worried about. I might have to move to Australia.
 
Does that equal "SQL Server Azure V12"?
I'm confused by Azure versions
 
@ConcernedOfTunbridgeWells Yikes!
 
@PaulWhite It's keeping me up at nights.
 
@ypercubeᵀᴹ This hour it's called Azure SQL Database V12. But yes, to answer your question sensibly.
 
1:02 PM
What was it called last hour?
 
Who can remember.
 
On the plus side, I think brexit might be quite good for New Zealand. Good old blighty will be wanting to buy lots of agricultural produce from New Zealand, just like it did back in the glory days of the empire.
 
@PaulWhite I (re)edited the question with the new info.
@ConcernedOfTunbridgeWells I was just reading an ad about a Postgres job an Wellington, NZ careers.linz.govt.nz/jobs/LINZ-17-20
 
@ypercubeᵀᴹ I think that's what used to be the old department of lands and survey. I guess they're using it as the arse end of some sort of GIS application.
Quite interesting. Quite a few of the PG jobs I've seen have been on GIS-type applications.
 
I think some of the 2016 spatial performance improvements were spurred on by the popularity of PG GIS. Not my area though so I might be wrong.
 
1:11 PM
@PaulWhite There are a couple of frontends as well - QGIS and something else that I can't remember the name of.
 
I've heard multiple people speak highly of it over the years, on performance and facilities.
 
@PaulWhite Although SQL Server has been keeping me busy for the past 15 years or so (and a certain other DBMS at other times but we don't talk about that) I've been keeping an eye on Postgres and it's getting to the last few major features it needs to be a credible general purpose EDW platform.
Once the PG team get parallel query working well then it's got the last real barrier to working with large volumes.
There are also clustering options like Postgres-XC, and I'd guess it's only a matter of time before someone builds a usable column-store backend for it.
Now that Microsoft are starting to shake down their customer base for pricing, I could see it becoming quite an attractive option. There's no intrinsic reason that it couldn't become the dominant player in the bottom end of the market.
 
@ConcernedOfTunbridgeWells It's likely that Postgres-XC will be merged with main Postgres, maybe even in the next version.
 
@ypercubeᵀᴹ That's quite interesting.
 
Or it could be the Postgres-XL one. Can't remember which one
 
1:21 PM
@ConcernedOfTunbridgeWells I don't think about PG much, but yes, it seems to me that parallel query and columnstore (ideally with something like batch mode parallel execution) would be needed.
 
Friday afternoon trilemma, Help the irritating project manager, or save the arrogant system engineer, do nothing and watch the train wreck afterwards
 
@PaulWhite They're just putting in the basics of parallel execution now. I suspect it will be a few more generations before it's really mature and perfor^H^H^H^H^Hquick.
@TomV Can you put the irritating project manager in a cage with the arrogant system engineer and see who wins?
 
Yes I saw parallel scan and aggregate I think.
 
@ConcernedOfTunbridgeWells That would be the consequence of the train wreck option
 
@TomV Would you have to clean up after the train wreck?
 
1:25 PM
@PaulWhite Probably
 
@PaulWhite Something like that. I daresay it will take a few major releases to mature it and get all the bottlenecks out.
 
@TomV The first two options then :)
 
Love that film.
 
I do too. All of Ritchie's London wideboy films are quite good.
 
1:31 PM
Lock Stock and Layer Cake.
 
Rocknrolla was Ritchie as well IIRC, as was Mean Machine.
 
Don't think I've seen those.
 
@PaulWhite Lock Stock and Snatch were definitely better but they're not bad.
 
Right up there with Pulp Fiction for me
 
1:46 PM
Yawn
 
The project manager wins (this time)
 
@TomV So the system engineer gets the pigs then?
 
i decided being arrogant is worse than being irritating, the PM got lucky
 
Tough call.
 
I dare say the pigs don't mind.
 
1:58 PM
Pigs are generally pretty easy-going.
 
are you now really talking about chopping the sysadmin and feed him/her to pigs?
 
Hypothetically. I assume.
@ConcernedOfTunbridgeWells I see Tony Blair is calling for Remain supporters to 'rise up' against brexit!
 
@PaulWhite I meant FOR XML PATH. As far as I can tell it's only worse if you use a CCI as an excuse to get rid of all of your nonclustered indexes, which is the path that we appear to be going down (for better or worse). I have a completely unsubstantiated theory that Microsoft is finally giving us STRING_AGG for the CCI with no indexes use case, so at least it won't be an issue in vNext.
 
@dezso Not sure you'll appreciate the joke, we could say Pandy had a "solution" for these types of issues
 
@JoeObbish I like to think that someone at Microsoft recently discovered that they could actually implement suggestions we've all been asking for for a decade or so, rather than just putting them on a shelf somewhere. Clearly there is a backlog :)
That said. Replacing all existing indexes with a CCI is one possible approach, and it may even work well in very many cases, but the ability to add NCIs over CCI exists for good reasons.
 
2:16 PM
@TomV took a while to identify the name as Pándy, but yeah
a bad joke is still a joke, to paraphrase myself
> These are nitpicks. They’re important [...]
finally, a justification
 
2:34 PM
@ConcernedOfTunbridgeWells thank you!
 
I should have gone for the train wreck option, I now find myself knee deep in a discussion with the arrogant System Engineer
And since I told him he was about to do something stupid, he now expects me to do his job
 
@TomV do a FLASHBACK
 
I'll just wrap up and go home, let him calm down for a couple of days before continuing that discussion
I should have just let him mess up
 
2:53 PM
BEGIN TRAN
DO WORK
IF @RET = 0 THEN ROLLBACK TRAN
 
@hot2use You can name transactions right? How about BEGIN TRAN WRECK.
5
 
@Forrest Yes, give it a tag. :-)
 
3:26 PM
IT IS YOU, EVAN.
 
@MaxVernon yes. there are better ways, sadly. =(
 
3:44 PM
I'm voting to close this question as off-topic because it looks like an assignment and shows no effort from the OP. — ypercubeᵀᴹ 48 secs ago
 
@melusi even less reason to have others do it for you. — dezso 9 secs ago
 
A_V
Hello everyone
 
hi
 
A_V
In my organization, when we take over or create new sqlserver instances we have this little procedure that we do which consists of creating maintenance plans
I've been thinking that using only sqlserver agent jobs with some SQL pre-made scripts would be faster but other DBAs says it's a bad idea
Anyone here care to share what they do when you take over a new sqlserver instance that was poorly maintained, in terms of backup policies and other scheduled jobs ?
Should i make a thread about this ? it's not really a technical question
 
4:15 PM
cool, maybe what i can do is to try it first and see if i get stuck, is that ok? — melusi 27 mins ago
In other news, I really dislike fixing unnecessary things on a Friday afternoon
like '@@' introduced by an UPDATE into email addresses
 
21
Q: DBA first day in a new job - check backups and security - How? what else should be checked?

marcello miorelliGenerally when I start in a new environment, I tend to check where are the backups, when the last full was taken, when was the last restore applied and I check the security too. The way I do this is via T-SQL. Check the backups ;with Radhe as ( SELECT @@Servername as [...

@A_V see Brent's answer on the question above
 
A_V
Alright, looking into it @MaxVernon
I've actually downloaded and looked at sp_blitz docs online a few times but never used it
I guess I should learn to use it ehh
 
4:36 PM
@A_V it works, and is being actively developed all the time by a largish set of people.
 
A_V
it is more of a priority to-do list of things than scriptable jobs for sqlagent
 
@A_V oh, you're looking for Ola Hallengren.
 
A_V
Holy cow there's some intense scripts on there
LOL, some of the servers in the infrastructure actually uses those scripts from Ola Hallengren
I figured the way you call the scripts seemed familliar :p
 
4:52 PM
@A_V they are the defacto standard for maintenance scripts.
There is another option, by Midnight DBA, called MinionWare, which is pretty good too.
 
@JackDouglas Heh, I might just need to :P We're taking a big look at our DBs over here soon, and trying to work through O'Reilly's high performance SQL is like chewing tar at the moment
 
A_V
@MaxVernon I have an html report built by a batch script emailed to me every day that contains the status of the backups last execution, failure, success, etc
the script is quite old and buggy though, any online free scripts that does the same kind of thing you ever heard of ? Definitely gonna use Ola stuff from now on
out for lunch, thanks for the hints max
 
00:00 - 18:0018:00 - 23:00

« first day (2236 days earlier)      last day (2627 days later) »