List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:December 18 2003 9:18pm
Subject:Re: Combining tables
View as plain text  
In the last episode (Dec 18), Arnoldus Th.J. Koeleman said:
> I have a live feed datasource that inserts into 8 different tables( but
> they are all the same layout only differennt regions) and i am not
> allowed to change this since it is from a customer.
> As with Oracle you can create a materialized view that will combine
> those eight tables into one physical table and those will be refreshed
> on the fly or on certain times.
> Is this also possible in MySQL since we want to query on one table to
> find the record instead off eight.

As long as all the tables have the exact same column definitions, you
can use a MERGE table to provide a combined view of them all.  I have
found that they only perform well under MySQL 4.1.1, though.  Older
versions had a tendency to perform full table scans across the lower
tables instead of using indexes.

	Dan Nelson
Combining tablesArnoldus Th.J. Koeleman18 Dec
  • Re: Combining tablesDan Nelson18 Dec