@nixCraft he's sorting it twice as every one because the default sorting as never hit home in the first try.
Even Santa... even Santa does it
for(goodness_sake) { be_good(); }
@nixCraft I started out thinking that was a Cake song.
We are now accepting callers
for these beautiful
pendant keychains.
@nixCraft No, Bobby Tables, still no presents for you this year, if you keep up with that sort of behaviour…
Oh, wait, it looks like your record says «behavior = “nice”» after all… I wonder how that happened…? 🤔
@nixCraft SCENE: North Pole Server Room. Some SOFTWARE ELVES are here.
SRE (SITE RELIABILITY ELF): Uhhh, the database server CPU just spiked.
DBA ELF: Someone trying to run last year's delivery reports?
SRE: No. (*sighs deeply*) The Big S is doing a SELECT * again. On the entire contacts DB, which just passed 8 billion this year.
He stored a big list
But his key choice is shite
No indexes so we'll be here all night
NoSQL Claus ain't comin', to town
@nixCraft I winced and wondered if he remembered to encode the contacts table in utf8mb4.
The trauma is real.
Bobby Tables made it to the top of the naughty list this year with:
;update contacts set address='mine' where behavior='nice';
in his email to Santa
@nixCraft Come on Santa. Normalise! Have a table where id 1 = 'naughty' and id = 2 'nice' (DEFAULT 'naughty') and do a join.
That way you can add a third category if needed, plus internationalisation becomes easy.
Those little curvy quotes around 'nice' probably won't work.
"You have an error on your SQL syntax WHERE behavior =..."
@mastreani SQL Clause