« first day (2241 days earlier)      last day (2629 days later) » 

1:07 AM
@ErikE should have swapped e-mails last night. Mine is aaron.bertrand@gmail.com
Oy, this guy
You can blog about it all you want, but you're not going to hit a scenario where a covering index is significantly better than the clustered index simply because the covering index is thinner. At least not outside of a contrived example, where you are intentionally designing your tables poorly to prove a point. — Matthew Sontum 1 min ago
 
1:30 AM
@AaronBertrand What this honestly sounds like to me is lack of experience in very large enterprise-level applications. I can't possibly imagine how he can't have experience that would teach him the utility of a covering NCI, in SEVENTEEN years. I've only been doing DBs other than Access for 13 years, and it's clear to me...
 
 
1 hour later…
2:50 AM
Agreed. If I/O hasn't been an important performance factor, even once, in 17 years, you either have very little data or very tolerant customers.
 
3:29 AM
I don't have a good place to post about this online, but thought you all would appreciate this. So in the US, chip readers on credit cards are relatively new--being introduce somewhere around a year ago. Many retailers don't support them, and others are still getting things together. What I've noticed is some atrocious UX in the paypoint terminals.
9 out of 10 of the machines says "DO NOT REMOVE CARD". The irony of this is that, just like why they advise you to give children positive commands like "put your feet on the floor" instead of "don't put your feet on the table", this also contains the words "REMOVE CARD."
I have been noticing this everywhere I go, and am in good practice and do it right every time. Well, almost every time. Then I was on the phone with my friend at a self-checkout terminal and guess what I did when it said "DO NOT REMOVE CARD"? With my mind half elsewhere, I removed the card.
 
Funny, I was tweeting about this very thing today
 
Plus, the screen is constantly changing while it's going through its process. First it says DO NOT REMOVE CARD then it says PLEASE WAIT then DO NOT REMOVE CARD again then PROCESSING or what-have you
I can solve this problem for these folks really, super easily.
 
Well, and yesterday
 
When you put the card in, display a single screen that goes like this: "Card inserted. Please wait." Then, don't change the screen or do anything until it's done. Then say "TAKE CARD NOW"
They created a system that is hard to follow even for an intelligent, observant, highly-motivated-to-do-it right person who is halfway distracted.
I wish I could share UX.stackexchange.com with a few paypoint terminal firmware designers
Far less serious, I've noticed that these terminals use "swipe" and "slide" interchangeably. There's some fun humor there if you pretend these are completely different actions.
 
Those machines are awful and were rushed.
 
3:36 AM
Like, it will say "slide card now", but if you get a card read error, it will say "Card read error, swipe again."
 
9 out of 10 places I go here in RI, there is actually a paper or plastic insert jammed into the chip reader, stating "don't insert, swipe!" And has been this way for months.
 
I always joke about how, OHHHH I slid the card, I didn't realize I was supposed to swipe it!
Yeah I see a fair number of those. I would say half and half (Seattle)
 
The CVS around the corner actually does support chip, but it can't read my chipped debit card (every machine at every counter, but it works elsewhere, so it's obviously systemic). I have to insert and fail THREE EFFING TIMES before it will let me swipe instead.
 
Well, that's too high. 50% of all places I visit have no chip reader, then the remainder, about 1/3rd of them say "chip reader coming soon" or somesuch.
I also wonder why it's so slow to read the chip. How can it be so slow?!?!
@AaronBertrand I had that exact thing with one of my cards for a while, but only at a couple of places. When the card got replaced, the problem was over.
P.S. I plan to email you but am trying to switch to a better email address and figure now is the time.
 
erike@saveMeFromTheTrolls.com wasn't a good one, huh?
:-)
This is genuine, friendly advice that goes back to the quality bar that I, Brent, and others have talked about. — Aaron Bertrand ♦ 29 secs ago
 
3:50 AM
another reason to like cash
 
Years ago I got frustrated trying to create my gmail address and thought "this is silly!" Then I ended up with an email address having "silly" in it. Now I cringe every time I give it out. I'm biting the bullet and am going to do something better.
@AaronBertrand Where is this quoted from?
@AaronBertrand Oh, the time is a link
 
Click on [29 seconds ago]
I used to have send_spam_i_love_it@hotmail.com
It was a legitimate address but I got very little spam - having worked at a mail gun I knew that the presence of "spam" in there would get it automatically rejected by most address harvesting automation
He drew attention to this answer here:
@BrentOzar At this point I've answered a lot of questions, so it would be easy enough to cherry pick the ones you didn't think I answered well. I could do the same for you, better even, because you've answered more total questions. The problem I have is with answers like the one I gave to this one. I haven't modified it, it was the first answer to the question, a correct answer and so far it has received 1 upvote and 2 downvotes dba.stackexchange.com/questions/165011/…Matthew Sontum 34 mins ago
Like the NCI thing, it's frustrating to explain things over and over again and still have the person (a) not get it and (b) continue to insist that they're right.
 
@AaronBertrand That's honestly what set me off two times now with another user (you know who I'm talking about). The criticism displayed a lack of understanding of the actual nuance present, then even upon an attempt to bring this up, further lack of understanding was demonstrated instead of the wit and determination to figure it out and come up to speed.
Like, Oh hell, that's EASY! Then toss off a completely wrong or irrelevant answer.
 
Yeah, you can answer the wrong question really well, or fling guesses, but neither is very helpful to the OP or to future readers.
Guesses belong in comments, IMHO. And suggesting a new car to fix a flat tire (e.g. replace your RDBMS because its explain plan isn't as good, according to you) doesn't belong anywhere.
 
4:19 AM
my assumption was that we didn't allow it because otherwise every question could turn into an RDBMS holy war
isn't helpful for anyone
 
@JoeObbish there are probably cases where that suggestion is valid - it's not so much that it isn't allowed. I think it's more that incessant, misplaced berating and preaching about anything is not going to be tolerated.
 
@AaronBertrand Interesting. I can't think of a question in which I've seen a valid answer like that, but maybe I haven't looked at enough questions yet.
 
@JoeObbish They wouldn't be "how do I get better performance out of this query?" questions, they'd be more about how to solve a given problem at a higher level.
Unfortunately some people think that EVERY problem can be solved by changing platforms.
 
@AaronBertrand As in "I haven't chosen my RDBMS yet?"
 
And can't fathom that some places are invested.
 
4:30 AM
@AaronBertrand That's another reason I try to avoid saying negative things about platforms here. That person might be stuck with it and be well aware of any shortcomings.
 
@JoeObbish No, there are certainly problems that are better solved by a relational database, like SQL Server, and others that can make better use of things like DocumentDB, or Azure SQL DW, etc. Or availability requirements like RAC that don't have equivalents in the current platform of choice. Or even where there is heavy use of, say, JSON. If that is a major part of your entire infrastructure and business model, PG may in fact be a better choice.
But in all of those cases, that doesn't mean ram it down their throat. Every single time. Ad nauseum.
@JoeObbish I've tried to more careful about even more granular things. I would say things like "who designed that table? fix it" when - just like platform - they may be stuck with it, due to vendor tie-in, dependencies, etc.
 
4:52 AM
true, definitely been there
 
 
1 hour later…
6:04 AM
Using the crystal ball on this vtc dba.stackexchange.com/questions/165132/…
 
6:45 AM
-6
Q: Is there any way to fix reputation mechanics here?

Matthew SontumI have only tried answering questions here for a few days. But I am troubled by the mechanics of the site. So far I've answered 36 questions. Of those 2 were accepted as the correct answer, 7 have received up-votes but were not accepted as the correct answer, 23 have received no votes and 4 have ...

@ypercubeᵀᴹ ^ The answers from meta.se are now back on meta.dba
 
6:56 AM
Crystal ball was apparently wrong after clarification.
 
After clarification it became even clearer that the question was unclear.
I do have a guess what they may be talking about, but my crystal ball may be malfunctioning too.
 
7:15 AM
I would guess order by numeric on a string. But I'm done guessing for now.
 
Yeah it's not a great question to begin with, and it needs a bit of clarification to survive.
 
7:38 AM
@PaulWhite Is meta broken?
(Good morning)
the comments are doubled.
 
@hot2use Nah that just happens with reversed migrations. I'll tidy it up.
Comments get copied on migration then double up on reversal. Daft but there we go.
Mar 21 '16 at 8:39, by Paul White
There's nothing good about a rejected migration.
 
8:14 AM
@PaulWhite I'm constantly learning
 
Thanks for pointing it out (the doubled comments).
 
8:59 AM
Feb 18 at 12:55, by ypercubeᵀᴹ
Mar 21 '16 at 8:39, by Paul White
There's nothing good about a rejected migration.
@PaulWhite I've edited my answer a bit. (sorry 1440 bytes, not a bit ;)
@JoeObbish I've suggested it sometimes. Usually after a few options (do A or B or C. Or maybe D; change to X dbms because the problem can be solved easily there)
 
9:58 AM
1
Q: Can you gain the performance benefits of partition elimination without changing SQL module or table definitions?

Matthew SontumI work for a company that has a multi-tenant database model that doesn't currently use database partitioning. The ideal end-state would be adding a new TenantID column to every existing table, including this new column as the first column in every primary key, and rewriting all existing SQL defin...

He seems to be a bit better at wrting questions than answers.
 
10:52 AM
Some of the terminology used there is confusing.
I think he means partitioning tables using a common partition function over ranges of SupplierID values.
 
good noon to everyone
 
'Evening.
 
Morning (Thursday)
 
11:08 AM
@MichaelGreen did I already ask if you were in Australia?
 
I can't remember, but yes - specifically Melbourne. Allegedly the world's most livable city.
 
@MichaelGreen is it really (as opposed to allegedly, I mean)?
 
Yes, it's lovely. Cosmopolitan, foodie, diverse, cultural. There's a major event or festival every month. Good beaches within 30 minutes of the city. Weather's never too extreme, but seasons noticeably differ.
One thing I think it lacks is a really good ski mountain. Not much we can do about that, however.
 
@MichaelGreen I know the feeling, being based in Berlin
well, it is more 'a real mountain', with the highest elevation of 120 meters above sea level
 
11:28 AM
I remember someone saying once, that if you start from the Dover cliffs (England) and travel East, the next equally high land is the Ural mountains. I didn't believe that until I travelled through Germany.
Do you get to the Alps often?
 
@MichaelGreen not really, once a year on average
we see some other mountains that are closer (Harz and Erzgebirge) a bit more frequently
the lack of elevation is one reason why I won't stay here for ever
 
I wasn't familiar with either of those. They look fun, if not overly taxing. Plenty of variety for a ski safari!
 
11:43 AM
@AaronBertrand & @Tomv : I was able to half the cost of that ugly query I showed you yesterday (GMT+1), by implementing two new indexes. And I changed MAX_DOP to 4.
The deadlocks have stopped occurring for the time-being.
 
 
2 hours later…
1:25 PM
@PaulWhite True. I don't understand how one can do partitioning without changing table schemas.
I won't even try to understand though, partitioning is way beyond my understaning
 
(This is what happens when I'm up since 2AM in Vegas and a question comes in while I'm looking at the home page.)
 
@BrentOzar Was it a test of some kind and you just want us to delete it?
 
No, I was having a laugh at whoever posted that question.
The question should obviously be canned.
 
@BrentOzar Ah OK thanks. Was just wondering if there was more to it.
 
It's my best answer of the day though.
I personally think everyone should upvote it immediately.
I have two decades of experience working with databases.
There are no other answers on it, so mine deserves to be accepted.
10
 
1:33 PM
Ha ha ha ha
 
Man, you deleted it before I could put a bounty on it
 
HAHAHA
 
It was obviously the exact correct answer
 
Obviously
 
And there can be only one
 
1:34 PM
/me points to his MCM certificate
 
@BrentOzar you're in Vegas and on DBA.SE. Why aren't you eating, drinking, and gambling?
 
It's 6 AM there. Brent starts drinking at 8.
And is in bed by 5:30
 
It's true.
Although today I have to give a 45-minute presentation at 10, so the drinking is delayed til 10:45.
 
@ypercubeᵀᴹ For a clustered table, one can just rebuild the clustered index on the new partition scheme directly. For a heap, I don't think there's a way to (re)partition except at creation time, or by creating and dropping a clustered index.
I'm not sure if that counts as 'changing the schema'.
I suppose it would?
 
@BrentOzar why wait? Drink during the presentation. It's Vegas!
I have jury duty today, I should just start drinking before I go
 
1:44 PM
Well, they are salespeople. They might even be drinking themselves.
 
2:15 PM
hi
question
let's say you want to set the following
in postgres
SELECT 'SELECT ' ||column_name1||
',fake_column,' ||column_name2|| FROM
mytable
I don't want to do it as a one-liner SELECT 'SELECT ' ||column_name1|| ',fake_column,'||column_name2|| FROM mytable
is there a way to break it into multiple lines
From what I recall, there is a way to say that it is the same line even if you have line break
This one
SELECT 'SELECT ' ||column_name1|| E'\r\n'
',fake_column,' ||column_name2|| FROM E'\r\n'
mytable
 
2:39 PM
@AndyK Not sure I understand. Which query do you want to be multi-line, the resulting one or the building one? The thing is, the building query itself appears to be incomplete. In particular, it has its own FROM clause but it doesn't insert a FROM clause into the dynamic query.
 
@hot2use I was about to suggest adding an actual line break inside the string literals.
That would work in SQL Server, not sure about PostgreSQL.
Oh, Craig's answer seems to suggest it would work in Postgres as well.
 
@AndriyM well I did search for breaking text in postgres in Google and the first his was the Q&A for Postgres.
 
3:30 PM
Using memory optimized tables in loops can yield out of memory errors.
 
@hot2use there was a question one week ago more or less, a_house_wnn gave an answer. I think it is possible.
 
4:30 PM
bye
 
@AndyK You can probably use dollar quoted strings for that
No need for escaping when doing this
But not sure what exactly you are afte. Is this for building dynamic SQL?
(irrelevant to the discussion above): Postgres: Still no Query Hints?
 
5:12 PM
@ypercubeᵀᴹ thanks for that
 
5:41 PM
@BrentOzar mix it up ... start at 1030 and work it into your presentation
 
6:32 PM
@ErikE I like how the workaround isn't posted
I assume it's to drop and recreate the table variable in the loop?
 
New to the chat, I have a question that doesn't have an easy stack-friendly answer i believe, anyone want to help a guy out and point me in the right direction?
is there a reason why a two databases restored from the same media would have wildly different query performance?
same machine, same backup, restored to UAT and CI , the CI restoration takes an order of magnitude longer to query for even simple queries
 
@McNets Thanks a bunch. :-) always learning
@FranciscoGarcia Hi
You are restoring the same database to two databases on the same server?
 
7:26 PM
right, exactly
they're copy only backups, and we do it every now and again to get more or less production level data to the test environments
simple queries against UAT are fine, more or less in line with production
but the identical queries against CI take 10 - 100x longer
 
Is this SQL Server? Is CI installed on a different instance?
 
@FranciscoGarcia Do you restore to existing UAT and CI database on the same instance?
@FranciscoGarcia Do you reorganize/rebuild your indexes before you test?
 
7:53 PM
sorry, right. It is Sql Server, both on the same instance
and now that you mention it, I'm not sure we're rebuilding the indexes, but that goes for either. I did run sp_updatestats, and that seemed to improve things, but only by a slight margin
 
You might get better results after rebuilding/reorganizing the indexes and then executing the statements at least twice.
 
Something to do with the database files perhaps? For instance, the slow database's file or files could be very fragmented.
 
@AndriyM +1
 
i will investigate, thanks all. I just needed a direction to run in. Much obliged
 
8:18 PM
@FranciscoGarcia You're welcome.
I'm going home too. 9pm maintenance window about to close. Nighty night.
 
 
1 hour later…
9:31 PM
@FranciscoGarcia Besides fragmentation, check if the files are on the same physical disks.
 
@ypercubeᵀᴹ sorry, do you know if a user with reputation 1 cannot accept answers on dba.se? dba.stackexchange.com/a/165225/110455
 
@McNets He can but has to wait.
 
Ok, thanks @ypercubeᵀᴹ
 
9:48 PM
Here it says it's only 15 minutes, so I don't know
32
Q: Time limit on accepting an answer

Michael KniskernWhy is there a 15 minute time limit on accepting an answer in StackOverflow?

 
@ypercubeᵀᴹ it seems tio me he's using two different accounts, Francois and F__M
 
@McNets yes, I commented.
 
@ypercubeᵀᴹ ok, thanks again
 
@ProfK please not be rude. We are all editors here. If you don't like a particular writing style, just say so and we won't change the style (and you can keep only the SQL formatting and other useful additions, like the 1:1.) Again, you don't have to be rude to people, especially when their aim is obviously to improve your question. — ypercubeᵀᴹ 1 min ago
What's wrong with people? (see his previous comment, which mine is a reply to)
 
10:20 PM
I can understand where he is coming from
from his point of view, a 2.5 year old question was edited into a worse state
I don't agree with getting emotional about it
 
@JoeObbish the wording may be seen as worse state. I don't think it's that bad but I'm not native speaker either.
But the edit did improve the code format
 
The now eliminated typo in the title might have triggered it. At least it could well have triggered my editing it if I saw it.
 
@AndriyM Ah, I hadn't noticed.
We'll wonder for ever if the intention was for "How do I ..." or "How to ..."
 
@ypercubeᵀᴹ One sentence was changed from "How..." to "So, how..."
I'm not a grammar expert but that's typically seen as poor style, I think
it's also totally unnecessary
 
Mind that MDCCL it not a native speaker, I think.
 
10:30 PM
MDCCL is not a native speaker, if I remember correctly. He probably just got that wrong. (I didn't know that was considered poor style either.)
 
English style issues are like database issues. The correct answer is "it depends."
2
 
@Forrest Hah, nice. With a typo, too! To drive us crazy since we can't edit ...
Lets talk about this guy now:
OK guys, just to play the devil's advocate. The answer isn't any helpful but it doesn't deserve to be at -6. (It's not that it's advocating the use of NOLOCK or something ;) On the other hand, the OP will get a nice badge, once (and if) he decides to delete it. — ypercubeᵀᴹ 2 mins ago
He really thinks that this answer of his is good.
I'm coming to believe that SE is a big troll trap.
 
I wish someone correct my grammar, I feel like my questions are always misunderstood.
 
@AndriyM Probably. And he probably noticed the question because he is following db-design tag and an answer on the q was edited 10 hours by Michael Green. Which brought the question on the front page
 
Seems likely.
 
10:43 PM
Many people aren't native English speakers. Loads of people post a shitload of code with no formatting. They add gratuities to the end of their posts. We tidy it all up, it's just what we do. :)
 
And it just so happened that in this case a non-native speaker edited a post by a native speaker. Big deal!
 
Silly question: I live near London now. Am I considered a native speaker?
 
@ypercubeᵀᴹ "It looks off" and "I've never attempted to do that" are parts of a bad answer. Especially once he learns that you can do that in later versions of SQL Server. At that point I'd expect him to delete his answer in embarrassment at ignorance.
 
@ypercubeᵀᴹ Native speaker: noun: a person who has spoken the language in question from earliest childhood.
 
@ypercubeᵀᴹ Not if you didn't learn it as a child and can speak in a way that "natives" would consider to be normal.
 
10:46 PM
@ErikE Yeah. The time he took to answer and write all those comments, he could have tested in rextester.com or spined up a VM in Azure, instead of saying "I have to try it"
@ErikE OK. Silly Q No2: but he is in Johanesburg, so he is not native either, right?
 
It's like someone answering a question "Cars driving themselves seems off. At least I've never attempted to have a car drive itself (I've always kept my hands on the wheel even with cruise control)."
But in a world of fully autonomous self-driving cars, that answer is ignorant and doesn't add any value. It's even borderline "not an answer".
 
@ErikE "And I've driven my car for 17 years."
 
@AndriyM SPOT ON!!!! Lol
@ypercubeᵀᴹ I guess at that point it becomes a judgment call. If it was his main language and he learned it as a child to the same competence as his teachers then yes he's a native speaker of that dialect.
@ypercubeᵀᴹ But you can be a native speaker if you're immersed enough even if it's not your main language.
 
As I understand it, this community highly values the ability to test and prove claims ourselves. So appeals to authority will seem awkward when we're used to seeing demo code.
 
@ErikE Yeah, I agree on all
 
10:53 PM
@ypercubeᵀᴹ do you like and appreciate language feedback?
 
I was trying to make a silly comment, that he is native in South African English, not the real ones ;)
@ErikE Yes
 
@ypercubeᵀᴹ spin -> spun (past tense)
 
@ErikE aha! That's why it was showing as red (I had it "spinned" first)
 
@ypercubeᵀᴹ spined would seem the past tense of spine, if you made it into a verb. Like "weak-spined" to refer to someone with no backbone.
 
Irregular verbs. One of my favourite (and "favourite") parts.
 
11:01 PM
@AndriyM Those silly verbs. They should eat more psyllium husk fiber. (To become more "regular'!)
@ypercubeᵀᴹ You've raised an interesting distinction that "native English speaker" can be many different things, depending on what English you learned...
 
For a non native speaker, the worst part of verbs are phrasal verbs.
 
Noun: psyllium (usually uncountable, plural psylliums)
  1. Any of several plants of the genus Plantago, whose seeds are used commercially for the production of mucilage.
  2. psyllium n
  3. psyllium...
Aha
 
11:17 PM
@McNets We can get through this together. We'll get in the car and go to a club tonight and totally get down. By the time you get up in the morning, these experiences will have helped you get through it! You may want to say "get out!" but I promise you it's true!
@AndriyM Checkout Metamucil, a product mostly made of psyllium which is designed to help you "go" as they say, to avoid constipation. I figured that irregular verbs just need some regularity. (See the last example meaning for definition 3b of regular.)
 
Went and edited one of my answers, removing 3 "So" from sentence start.
 
@ErikE I don't really mind them, just some of them are a bit too irregular :)
Or when you have cases like "lay, laid, laid", "lie, lay, lain", and "lie, lied, lied".
 
11:34 PM
@ErikE Thanks for pointing it out, I will pull over and think about it. I don't give up! ;)
 
It's easy to get ahead with someone you get along.
 
@AndriyM Someone you get along with? Heh.
@AndriyM English is super particular about its prepositions. On the wall; but in bed (if under the covers) but on the bed if not; in a country; at the mall (unless you want to emphasize physically being within the building, then in the mall). In december; on the 5th of december; at 8:00 pm.
@AndriyM In Portuguese, for example, it's perfectly legitimate to "put your shoes" whereas in English we are alarmed by this and want to know where you plan to put them.
 
11:50 PM
I learned a new word today, (besides spun and span)
Chroococcidiopsis is one of the most primitive cyanobacteria known. It is a photosynthetic, coccoidal bacterium and while a diversity of species and cultures exist within the genus, with a diversity of phenotypes, some members of the genus are known for their ability to survive harsh environmental conditions, including both high and low temperatures, ionizing radiation, and high salinity. Organisms capable of living in such harsh conditions are referred to as extremophiles. == Desiccation resistance == The ability of Chroococcidiopsis to resist desiccation in arid environments is due in p...
 
@ErikE Get along with, yes. I realised I might have made a mistake there and came back to say just that. Thanks for confirming my thoughts!
 
0
A: SQL returning multiple variables

McNetsFirst, there is a missing right parentheses here : LEFT(b.col_1, len(b.col_1) -4 Second, you cannot return two columns, use two case statements. SELECT *, CASE WHEN a.col_1 IS NULL THEN LEFT(b.col_1, LEN(b.col_1) -4) ELSE LEFT(a.col_1, LEN(a.col_1) -4) EN...

Is there something wrong with CASE WHEN field IS NULL?
Don't worry
 

« first day (2241 days earlier)      last day (2629 days later) »