Leddy: Sorry so help me understand why i would need the m2m relationship?
Richter: DAM9779, You have 1 song = many users – many votes – one user
Goetz: Sorry, wrote that incorrectly
Buziak: 1 song – many votes by same user – on user
Wolfinbarger: This coffee shop has no alcohol.
Germond: Oh well, 13 minutes to midnight here
Fralin: DAM9779, I don’t say that you should modify your schema. But that is in my opinion what you are seeking for
Bish: Dunnock yeah i’ve been thinking that my schema is very limiting, but i’ve not come up with a problem with it yet, but i’m starting to think i’ll have some in the future. so your comment makes sense.
Arlan: DAM9779, Take pen and paper. Draw the idea on paper first. mean the tables. then start to think in clear sentences what kind of queries you want to execute
Gartley: DAM9779, Example: I want to rate my users by amount of articles they have commented and written. So: Users table -1-n Articles -n-n – comments
Entrikin: Sorry, my pseudo code is on vacation
Coville: Oh well, bad example. But you’ll get the point. you seem savvy enough for it :
Ripka: Ha, you’re giving me too much credit but i’m getting what you mean.
Cryer: Thank you for the advice.
Cook: Could concurrent query write into users_resources_locks between INSERT and SELECT part of my query?
Willbanks: For example: timeline. 1 My query selects 1, 123, 2, 123, 3, 123. 2 Concurent query writes into users_resources_locks values 1, 54321, 2, 54321. 3 My query writes into users_resources_locks values 1, 123, 2, 123, 3, 123.
Peight: I recently had a zoneminder server fill up its hard drive. and when I fixed the problem and made room and booted, mysql started eating a bunch of cpu time and drive activity. I figured it just needed time to do its thing so I stopped zoneminder and let mysql run overnight. the next day everything was back to normal. What is mysql doing at those times?
Manross: Compdoc: replaying it’s innodb log files to bring the database up to date?
Hamm: NoOova: See: https://dev.mysql.com/doc/refman/5.6/en/innodb-transaction-model.html
Hamm: NoOova: Essentially, MySQL stores multiple versions of rows, and if you start a transaction, it won’t read rows that are “newer” than the transaction you started by default.
Manross: NoOova: and if you’re not using a transactional storage engine you’re dealing with a full table lock
Kraker: Hamm it is for repeatable read isolation level. But in read commited?
Hamm: NoOova: that doesn’t change anything since you’re doing a non-locking SELECT.
Hamm: NoOova: More clearly, REPEATABLE READ sets the version of rows you read the “read view” when you start a transaction. READ COMMITTED sets a read view when each individual read is started.
Hamm: So if you’re only performing one select, it doesn’t matter.
Sobers: Here is my question more detailed
Hamm: NoOova: You should be able to test this behavior yourself pretty easily, but it looks like you have an answer in the SO post now
Bresee: So back to my question, if I do create an events table and store a reference to a comment in 2 tablescomment table and event table when users delete a comment, I have to update to tables might mark the second row as ‘invalid’ or something. now the question is.
Toothacre: Is that inherently bad? updating in 2 places
Edgeman: This article seems to imply so: quote”. Basically, if you notice that a change you make to a database requires more than one operation, your database is not normalized.
Thurn: I’m probably doing something dumb. I’m trying to use an inner query and then group by. seems like I should be able to do that? https://gist.github.com/mustmodify/b038a330fc2bf500b8c7
Murrin: Obviously the inner query isn’t like that. But that part works alone. so .
Varieur: Mustmodify: don’t be so hard on yourself.