>>>>> "Greg" == Greg Fast <gdf@stripped> writes:
Greg> I have an application for which it would be very convenient to be able
Greg> to treat multiple tables as one table. (Specifically, I have
Greg> time-series data which periodically gets partially moved to archival
Greg> storage to save space, but I would like to be able to occasionally run
Greg> various summary calculations on the whole data set.)
Greg> Looking through the docs and the mailing list archives, it seems that
Greg> the MERGE library provides such functionality, but I haven't found any
Greg> indication of how to actually *use* MERGE to do this.
Greg> So my specific question is: given a set of tables "table_1"
Greg> .. "table_n" (with identical definitions), how do I set things up to
Greg> treat them as a single table?
Greg> Indices are not an issue for this. Read-only access to the composite
Greg> table is sufficient, and a speed hit isn't a big deal since any
Greg> operations on the combo table will be strictly offline.
The MERGE libary should be able to handle the above without any
problem; We already us it here at TCX for similar things and it's
The main thing missing in MySQL are:
- Adding the MERGE table option to sql_yacc.yy
- Adding a syntax to create the map a number of tables on a merge
table; For example:
MERGE table1,table2,table3 ... ON merge_table.
- Fixing that one can change the mapping while someone else is working
on the table (This is the only hard part left).
I shall ask if someone of the MySQL developers would be interested in
fixing this real soon.