[wp-hackers] MySQL: Union vs global table
Dino Termini
dino at duechiacchiere.it
Fri Feb 21 16:39:04 UTC 2014
Hi Morgan,
thank you so much for your availability. I will contact you in private
shortly.
Best,
Dino
On 2/20/14, 8:00 PM, Morgan Tocker wrote:
> Hi Dino,
>
> On Feb 20, 2014, at 10:15 PM, Dino Termini <dino at duechiacchiere.it> wrote:
>
>> I am working on a plugin that stores information in a table. In MU environments, each blog will have its own instance of that table (just like wp itself does for posts etc). Now, I am also being asked to provide a "network view" of that information. I evidently have two choices: UNION ALL on wp_*_mytable, or use a global table with blog_id. We may be talking about millions of rows per blog. So the latter approach would affect performance when analyzing the info for a given site (more frequent), I assume.
>>
>> What would you do in this case?
> I work for Oracle (MySQL team).
>
> If you have an example query (and ideally can provide EXPLAIN <select statement> output), I’d be happy to tell you if it is efficient.
>
> - Morgan
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list