-
Notifications
You must be signed in to change notification settings - Fork 7
DB schema tracking bug #44
Comments
This is all of the input I have on the matter. You should wait for @woxxy or anyone else to comment on it as well. Also, it might be a good idea to list a few drop-in replacements for MySQL.
|
I just remembered another thing. I hate, hate, HATE the fact that the one-to-many association between However, we use |
Can do, let's also have superfun changing all ->parent to ->thread_num. The rest is what we agreed on plus a few columns' name changed. The issue is that we'll want to change the names of the indexes to match the new ones, which I am already doing in the migration. Foolz on Percona now so that doesn't need an index rebuilding anymore (yes, I switched to Percona because of this!). |
Onto fulltext search, the
If this will use triggers, please let's add a MySQL session variable so we can turn it off. Probably it would be necessary anyway since not everyone will be using the |
Since I was running
|
Thanks for this, index disorganization has been bothering me too. I'm guessing trip and email can be dropped for people running Sphinx, correct? Also, what do you need the index in expired for, by the way? |
Yea, it is a bit annoying when I look at the indexes. I thought that having The |
Tagging @woxxy, @oohnoitz.
I believe this is what we decided to support, at least for now.
What indexes can I drop for MySQL+Sphinx and MySQL+FT? There's a lot of unnecessary indexes there for MySQL+Sphinx, but I don't know what you guys need on your end. Same for MySQL+FT, but that one actually uses most of the indexes. I want to separate indexes that are only needed for MySQL+FT from the ones that are needed by both.
I believe we agreed that we would drop support for MyISAM on the main table. Fuuka, Asagi and FoolFuuka all need changes in order to support the MySQL InnoDB+MyISAM FT search scheme, for non-Sphinx environments. You guys good with that?
MySQL+FT schema. This table would not be created for MySQL+Sphinx environments. I'm guessing:
a_search: doc_id | title | comment
Email, username, tripcode and can all be handled by MySQL exact matches with regular MySQL btree indexes. I'm offering filename search on Fuuka, and I can't decide if I should go for exact matches or fulltext matches on that. If the latter,
a_search
on MySQL+FT would need to also have themedia
field there. What do you guys think?Field names for thumb / images are driving me up the wall. These names are all wrong, they've always been wrong and I keep making mistakes in the code because the names are so incoherent with each other. I'm not entirely sold on
media
/preview
/orig_filename
. With the image deduplication scheme,preview
should actually bepreview_orig
andorig_filename
kinda makes sense asmedia_orig
. (media
should matchpreview
. The fact thatmedia_filename
is the field that actually matches withpreview
and media is the media filename has always been a great source of error for me). Then on the images table,media_filename
should bemedia
andpreview_op
andpreview_reply
are just dandy. I'm sorry for keeping on changing the names on you guys, but this really is the last one that makes sense, don't you think?media -> name of full image on 4chan
preview -> name of thumb on 4chan
preview_op -> name of OP thumb on 4chan that got saved locally
preview_reply -> name of reply thumb on 4chan that got saved locally
media_filename -> filename of image in the hard drive of the user for that post (the filename that shows up in the post, ie: the ONE FIELD that is deserving of having filename in its name)
So in the main table, we'd have:
media_orig | preview_orig | media_filename
And in the _images table:
media_id | media_hash | media | preview_op | preview_reply
This makes a SHITLOAD more sense.
I know this is confusing because I'm switching the names of media with media_filename, but the thing is, THOSE NAMES HAVE ALWAYS BEEN SWAPPED, and I keep getting so fucking confused because of it. I really, really want to settle this once and for all, and since we're making DB changes, hey, perfect moment.
Do you guys want to kill me for this? You can link to this page the next time you have to go down for DB changes and a thread inevitably pops up on /jp/. Add that "Eksopl is the one pushing changes after changes of time consuming database because he wants to give the impression that foolz is always" to fuel the conspiracies, if you want.
What name did we settle on for 2ch-like IDs? poster_hash? I believe we were avoiding _id so it doesn't get mixed up with actual ids we use in the database.
On that note, we were going to rename the
id
field to something, right? What was it?poster_ip
?We agreed that, at least for now, we're going to make it so the auxiliary tables can be fully recreated from the main table, so fields like height/width that could be moved to the _images table aren't going to be moved at this time (in case of a botched up migration, an archive owner can just drop aux tables and run scripts to recreate them). We're adding poster_hash, I can't say I care about locked, because it's only ever paired with stickies, EXIF can wait because no one is archiving /p/ and deleted media info, while interesting, can also wait until a later date, when not so much is happening at once. Ttimestamp of thread expiration sounds neat (I lifted that idea after looking at the schema of nih). However, I don't want to litter the main table with a field that's only going to be used when parent = 0. Should we wait on that until a later date so we can put it on the _threads table?
You can pull request the migration script you guys made once you're ready to roll. As I posted in roadmap, I won't merge until htmlnew is rolled out, though. We also need scripts to drop indexes on Sphinx and create the extra table on MyISAM FT, but I can do those.
Anything else?
The text was updated successfully, but these errors were encountered: