Is there a CLI-way to do.

 
Radder: Signing off now, thanks for the help folks!

Diers: The reason I think it’s ignoring the ORDER BY is if I change GetSongFromPlaylist5 from ORDER BY MR.created_at to ORDER BY MR.created_at DESC, I get the same result.

Swed: Tstrimple, it should work the way you expect – http://sqlfiddle.com/#!2/e7c7e/1

Alfredo: Was just putting fiddle together with actual tables and data :

Swed: Tstrimple, in that case finish it so we can check that too :

Swed: Tstrimple, one thing seems weird to me – any reason to use left joins? you select and order by columns from those tables – the null values might be not what you want

Buckley: I don’t need LEFT JOIN on the Media_Tags, but I do for the Media_Request. I want to be able to fetch an item even if it’s not in Media_Request.

Gliues: Actually, the sort works better because it’ll select the NULL values first, which is what I want.

Mundie: Ah, too much data for sql fiddle.

Vanwye: Hi. If I have a column that must not be empty during creation, is it right to ***ign a “not null” attribute to it?

Swed: Yep, pick only small part of data which shows your case – you can use multirow insert to put more in it

Bingle: Https://stackoverflow.com/questions/32709690/what-to-***ign-for-mysql-column-that-must-not-be-empty

Stumph: Dsa_: yes, it is correct. however mysql does not enforce CHECK constraints even tho you can give those as well

Mattione: Swed: Having problems creating the proc and function on fiddle. Are they supported?

Fillhart: Swed: Got it! http://sqlfiddle.com/#!2/0c52b2/1

Swed: Tstrimple, really weird – http://sqlfiddle.com/#!2/0c52b2/6 – using the query directly returns the same value

Gaer: Yep, but if I return that from a function or out parameter in a procedure, it gives a different result.

Swed: Tstrimple, http://sqlfiddle.com/#!2/3620a/1

Swed: Tstrimple, can you spot the difference?

Crowdis: I have spent way, way too long looking at this :

Swed: You did not specify the table with all mediaid – so it probably picked the variable null at that moment? instead of the column name

Swed: Tstrimple, rename the other variables too userid.

Loeffler: Confirmed it works on full test case. THANK YOU!

Shumaker: I have two servers with different distros and would like to figure out why there is a radical performance difference. How should I proceed?

Odonell: Show create table on each of them matches but EXPLAIN shows that one is using an index and the other isn’t; datasets are very similar but one is a day behind

Swed: Lucid, plans depend on statistics, so a difference in data or even in gathered statistics can change the plan – can you pastebin the tables, query and those explains?

Mank: Swed: lemme do a quick sanity check

Apel: Lucid: check configuration difference with pt-config-diff too

Whittenberg: Http://pastie.org/pastes/10437044/text?key=mg3cbat136ywlolevb3ka

Sepulvado: I see the differences between them but WHY is a mystery to me

Bryner: I’ll get SHOW CREATE TABLES, sec

Novitski: Show create tables Sellers & Ranks: http://pastie.org/pastes/10437046/text?key=glztygpes6v6fgumo5yag

Murch: I don’t see the relevance of that paste

Marengo: Derpman1: it was requested

Shotkoski: You’re ****ysing performance and you’re printing out the format of your tables. why

Valvano: What does “pastebin the tables” mean if not the format of them?

Petell: If someone wants it for understanding and they’re helping me I’m not going to deny them the information

Stavrides: Well whoever asked you that. i have no idea why they did

Troge: Derpman1: that’s. good?

Polisoto: Have you looked at my.cnf for each?

Sekuterski: Is there a CLI-way to do that? I usually find it difficult to look at configs across distros because they have different ways of dividing and managing them