[wp-hackers] Network activations and WP SlimStat
dino at duechiacchiere.it
Tue Nov 9 01:53:58 UTC 2010
thank you for your feedback. Please allow me to give you some more
details about my plugin, so that we can all talk about the same stuff :)
> Looking through WP Slimstat, I see you're storing a ton of information
> on a per blog basis. Stats, visits, and outbound.
> Why are these not all in one table each? Why give each blog separate
> tables? I mean, you could add a measly blog_id integer and combine all
> those tables into a total of 6 tables only, no matter how many blogs
> there are.
Good question. Of course I could have introduced a blog_id and combine
all the tables to make the thing scale no matter how big the network is.
But what is the difference between 100 tables containing 1 million
records each and 1 table containing 100 million records? The second one
will be much much slower when performing SELECTS and other operations,
and will be much bigger than the 100 tables combined, if I enable
indexing on the most queried fields. I'm not a DB guru, so there's
probably something I'm missing here.
> Things like countries and other "static" bits should be hardcoded.
> Does the "countries" table update itself in real time or something? If
> not, why have it in the database at all? I see it's pulling from a CSV
> file.. Why not change that file into a PHP array and then just load
> the array and do the substitution that way?
Hardcoded? I had thought about that, but in other words you're
suggesting that it's better to load a 3.5 Mb array into memory EVERY
TIME the plugin has to record a new hit, than querying the database to
find the same information, am I right? My Wordpress is already taking 48
megabyte of RAM to load and perform each single request, should I really
add 3.5 more megabytes to the pile? I mean, if you think this is the way
to go, and that it performs better than a DB query, I'll do it :-) But
when then users will complain about their RAM usage, I'll send them to
you, ok? :)
> Another point that comes to mind is that, generally speaking, almost
> all of this data is never actually used for anything. A lot of stats
> plugins are like this, they store data for every hit to the site, but
> then only really display charts, graphs, and other summary type
Sorry, but this is not the case with WP SlimStat. It allows you to
drill-down into the metrics, filtering data, and ultimately giving you
access to the 'raw data' that users can browse and inspect line by line.
It's not just a bunch of graphs and charts, please try it by yourself :-)
Thank you again for your time, really appreciated.
More information about the wp-hackers