3 ms·
I considered this aspect but I'm using these tables for statistics. Basically I am giving each user of my website a table for storing statistics about their si
by NathanKP 17y ago
I considered this aspect but I'm using these tables for statistics. Basically I am giving each user of my website a table for storing statistics about their site usage. Some users however, never really "complete" the process and don't really use the website, thus they have no need for statistic tables. So I have the idea of saving space by creating statistic tables as they are needed.
I'm going to try the "create if not exists" first and if that causes too much MySQL server load I'll just create the statistic tables at user registration and save processor usage at the expense of disk usage.
- duskwuff 17y agoDon't create tables per user. Seriously, don't. There's a (relatively low) limit to how many tables MySQL will keep in memory, and once you hit that limit it isn't very good at keeping the right tables loaded. Instead, redesign your database schema so that you can put all of your users' data in the same tables.