Is there any size limit on a MySQL query?

hi guys

i have tables which I query with a “huge” query string, and it’s different
each time it run … And it also grows over time.

So, is there any upper limit how large a query string can be?

Sample:

CREATE OR REPLACE VIEW v_view as
SELECT id FROM table_1 UNION
SELECT id FROM table_2 UNION

SELECT id FROM table_n

with n>500000

thank guys

Just out of curiousity, how comes you have so many tables?

hi guido2004

because I have many blogs (about 20,000 blogs), each blog has about 10 tables

have you know “how large a query string can in mysql?”

thank replay

No I don’t know, sorry.
Did you try “unioning” them? What happened?
I have a feeling you might encounter some serious performance problems before you reach the limit of the query string length. But I might be wrong, I’ve never worked in such a situation.

ok, no problem

I wanted including the group tables to view, search in the view (search all blogs)

you should have 10 tables overall, then, not 10 per blog

20,000 blogs??? whoa!!!

who updates all these blogs (surely not you) – and more importantly, what’s in them?

hi r937
I am using Wordpress to manage the blogs( plugin MultiSite), multisite created by the 9 tables each blog, and I use Global Search Multisite plugin to create view search all blog (not 9 tables overall) but a database very large, not create view.

What’s your idea for this?

thank replay

ps: I am very sorry for late reply

i’m sorry, i don’t know what to tell you