Ashlin: The examples are on here: http://pastebin.com/NJdK7t87
Jenison: When i use the mysql binary to connect interactively, i have no problem creating and accessing tables, but when i try it non-interactively, i get access denied. can anyone suggest how to troubleshoot this?
Swed: Jmpp, the last one is number of unique pairs of courseid,userid – it is very similar to the number users, so I would say that each user in average is only “***ociated” with one course, sometimes two
Greenbush: GetSongFromPlaylist4 and GetSongFromPlaylist5 show different results, even though the query is the same apart from the INTO statement
Arron: Thought somethign like that, but I didn’t quite understand it because the column had only one distinct. but, yeah, now I see how it works
Colvert: So, given my numbers, you say it’s preferable to do nested loops and a simple select query on the innermost one?
Swed: Tstrimple, and are you sure that ordering by “MR.created_at” wont give you two rows with the same value? maybe zeroed date? because if they are ordered the same, sql can “randomly” pick one or the other because they both satisfy the same condition
Heist: I may be getting the Risse wrong for non-interactive use of the mysql client binary, i see it says access denied . “to database ‘show tables;'” but clearly show tables is the command i’m trying to issue
Swed: Jmpp, either that or just loop by users and select and process all courses for a given user in one run but you might want to check if some user does not have too many courses to eat your ram
Leinhart: Yeah, I’ve confirmed it’s not just randomly selecting one of the first two results. It’s like it’s not using the ORDER BY at all. The result is coming from somewhere around the middle of the dataset.
Swed: Tstrimple, and does it do the same when you run the queries directly and not through the stored procs?
Barrientes: Swed: nah, it has to be for per course. For a specific course, I have to grab all entries belonging to a particular user, ****yze them, keep the “winner” and discard the others, but all for that specific course
Koroma: Here is the query when run directly, with the date included.
Cichy: Can you guy see anything obviously wrong with this invocation: mysql -u totonacan -p”REDACTED” -h arrl-db001.artsrn.ualberta.ca -D totonacan “show tables;”
Schutt: Http://pastebin.com/rbPim9YZ
Folgar: I expect to see 21032, but I’m getting 20916
Roehrs: Btw do i have write permission in this channel? can anyone hear me?
Sandridge: Yes, can see jcrowgey
Scarola: Are you actually putting quotes around p***word?
Swed: Jmpp, yep, but you can query all courses for a given user and then loop over the data and processing “groups” of rows belonging to the same course – but that was a bit of optimization to not run so many “distinct userid” queries, the nested loops seem ok in general
Tricoli: Ok, thanks for confirming it tstrimple
Devore: Tstrimple: yes the p***word is correct
Fyfe: And when i omit the command at the end, it properly opens a connection and drops me into an interactive shell, which works as expected
Klines: Oh, try piping the command in. mysql -u totonacan -p”REDACTED” -h arrl-db001.artsrn.ualberta.ca -D totonacan “show tables;”
Tanimoto: Tstrimple: i’ll try that, thanks!
Swed: Tstrimple, and what does it show when you add the “limit 1”, and if you add limit and remove “MR.created_at” from select?
Bronstad: Also, you can try -e “show tables;”
Munk: Swed: OKOK, thanks for the insight, I’ll just keep it simple and go with nested loops
Martir: After all, this thing needs to be run only once, slimm down the table, be done with it, go back to redesinging its replacement
Srinivasan: So, well, thanks for your time & help, much appreciated!
Woodington: Without order by: http://pastebin.com/8kemGAe4
Beltre: Tstrimple: that -e works well, as does echoing in the command. I knew i was missing something simple! best