List:General Discussion« Previous MessageNext Message »
From:Michael Monashev Date:July 19 2005 8:58am
Subject:Re: Multitable selection
View as plain text  
Hello

BM> Are you looking to compare a few last records in each table or ??
BM> Can I get a little bit more details?

I have 10 similar tables. 3 years ago it was one big table. Now I
split it to 10 tables.

3 years ago I could write:

SELECT * from BigTable WHERE date_col>$some_date ORDER BY date_col

Now I have to write:
SELECT * from Table0 WHERE date_col>$some_date
UNION
SELECT * from Table1 WHERE date_col>$some_date
...
UNION
SELECT * from Table9 WHERE date_col>$some_date

after push this rows into temporary table and after write:
SELECT * from TempTable ORDER BY date_col

How to make it simply and faster?
  

Sincerely,
Michael,
 http://xoib.com/ http://3d2f.com/
 http://qaix.com/ http://ryxi.com/
 http://gyxe.com/ http://gyxu.com/
 http://xywe.com/ http://xyqe.com/



Thread
Multitable selectionМихаил Монашёв17 Jul
  • Re: Multitable selectionGleb Paharenko19 Jul
    • Re: Multitable selectionMichael Monashev19 Jul
RE: Multitable selectionMikhail Berman18 Jul
  • log fileprathima rao18 Jul
    • Re: log fileBruce Ferrell18 Jul
  • Re: Multitable selectionMichael Monashev19 Jul
Re: Multitable selectionPeter J Milanese19 Jul
  • Re: Multitable selectionMichael Monashev19 Jul
RE: Multitable selectionPMilanese19 Jul