I am being a terrible database person and duplicating data all over the place because these queries are taking way too long.
Who cares if I can have the date for all of these entries in a single place, storage is cheap and I am impatient.
@inmysocks it's called caching and it's goooooood
@zatnosk my old CS professor always said that if you had the same piece of data in two places in your database you were doing something wrong.
But I guess strange is a lot cheaper now than it used to be.
@inmysocks eh, it's better to duplicate/cache a rarely updated number in a often read table, than join on a table with 100000 rows.
At least, that's my opinion. But whatevs, I'm a PHP dev, so I'm going for whatever works and not correctness or beauty.
@zatnosk I am moving in that direction.
After redesigning the schema to have a bunch of duplicate information in different tables and rebuilding the whole thing over night the queries are taking much less time.
Like half a second instead of minutes.
So that was worth it.
I still don't really approve of this 'sql' thing.