mysql - Efficient way to find maximum value on 80+ tables -




i have 80 tables , want filter has highest price among 80 tables. plan on using query:

select id  (select id, price t1 price = (select max(price) t1)     union     select id, price t2 price = (select max(price) t2)     union     select id, price t3 price = (select max(price) t3)    ) m  order price desc  limit 1 

but find inefficient. there other way? in advanced

i think lot faster.

select id, price t1 union select id, price t2 union select id, price t3 order price desc  limit 1 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -