List:General Discussion« Previous MessageNext Message »
From:Peter J Milanese Date:July 19 2005 9:11am
Subject:Re: Multitable selection
View as plain text  
I had a similar setup, involving log parsing. It was impractical to put all
of the data in one table and expect to get timely results. In order to do
it, I scripted the generation of the temp table (think I used a merge,
since it is not actually moving data and is fast). So... I scripted the
date range, assembled the merge statement, then pulled the query on the
merged table. I would imagine that there is a way to do it all in sql, but
I found it much easier to script it since the end result was html.

------Original Message------
From: Michael Monashev
To: Berman, Mikhail
ReplyTo: Michael Monashev
Sent: Jul 19, 2005 1:58 PM
Subject: Re: Multitable selection


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
SELECT * from Table1 WHERE date_col>$some_date
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?


MySQL General Mailing List
For list archives:
To unsubscribe:

Sent from my NYPL BlackBerry Handheld.

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