TheMineBench: In other.

Landesberg: Venezia: the main reason I ask is I’m parsing the binlog in python and I keep getting: UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xc8 in position 465: invalid continuation byte

Hauersperger: I’m not sure if it’s why, though.

Venezia: Hm no the default db ch****t wouldn’t cause that

Venezia: If mysql can read the binlogs but python can’t, might be a problem with how python is parsing it?

Bilbrey: I am tryingto determine if it is more performant to use 2 joins vs 1 join and a subquery. full table scan + non unique key lookup + non unique key lookup vs full table scan + non unique key lookup + unique key lookup + full table scan

Cleverley: Venezia: seems odd though, seems largely adopted:

Sonka: Coder7of9: Not enough detail. Just test it. Pick the behavior you like best.

Cronkite: Hello! I know this is kinda a specific problem, but I’ve been stuck for a while now. I have a account table id, username, p*** and a logins table accountId, clientId, loginTime. I want to Select * FROM account WHERE username=? and JOIN it with whether or not one of the past 5 logins from that account have the same clientId.

Mario: Coder7of9: For better performance with subqueries or derived tables, look at some of the newer versions.

Jeong: TheMineBench: “and join it with” what?

Fahy: Doing my upgrade from 5.1 to 5.5 today, im actually not upgrading in place, but migrating data from old server to new. Im debating on whether I should avoid copying the mysql tables and just focus on my data tables. Any suggestions?

Athans: Xgc: I.e. the return should be accountId, username, p***, hasLoggedInWithThatClientIdInThePast5Logins

Mcgiboney: TheMineBench: A testcase might be best when you’re having trouble with the description. Make sure you include sample data and the exact expected result and why that result is correct / the logic behind it.

Manoogian: TheMineBench: Last 5 logins of what, just that user?

Posthumus: Xgc: correct, each time they login it’s stored in the logins table.

Boydston: Is there a propety for transaction that can speed up my inserting billions records?

Venezia: Scott0_: to preserve accounts and such, go ahead and migrate the mysql tables, just run mysql_upgrade on the new server after you do

Venezia: Zaherdirkey: good hardware, os config, db config, table design, and insert batching. that’s a very complex question.

Bitters: Venezia: i cant control the server, all is my client application

Venezia: Well, if you’re working on a large project, it’d be wise to consult the person who runs the server

Papantonio: TheMineBench: Right, but the client id which is what you want to compare is in the logins table. So where are you getting the new client id to compare with the existing logins?

Venezia: From the client side, make sure you choose a good batch size, and if there are multiple threads, make sure you’re in read-committed

Venezia: But not terribly much you can do on that end

Sudar: TheMineBench: Are you asking if any of the last 5 client ids are the same? That’s simple.

Beccue: Xgc: Correct, here is a example of kinda what I want to do:

Hoffmaster: It is just a simple app but large records count, i am now reading about LOCK TABLES am i in right way?

Venezia: No, you don’t want to lock a table usually a client wouldn’t have permissions to do that anyway

Cobern: TheMineBench: Do you know how to get the last 5 logins for some accountId? Show me.

Tocher: TheMineBench: Do you want to do this for all accounts or just one specific account?

Labrode: Xgc: Just one account. what do you mean get the last 5 logins, isn’t that what I did?

Algee: TheMineBench: Yes. Now separately, if given a table called “last5”, which contains clientId, can you tell me how to find any client ids that appear more than once?

Peat: TheMineBench: In other words, find duplicate clientIds.