Hi!
On Apr 30, Matthew Shaw wrote:
> Hi,
>
> The merge table created is called asic_cache. It has exactly the same
> structure as above except there are no keys what so ever. My
> understanding is that there is no need for keys on the merge
> table as the table handler uses the keys on each individual table when
> doing the lookups.
You're only partially right.
Table handler for MERGE can use keys of underlying tables for
key lookups, but in fact it never will, as SQL optimizer will never ask
to. Specifying keys for MERGE table is for SQL optimizer to able to
chose the best way to execute your SELECTs. No real keys are created,
as MERGE handler ignores requests for key creation - but SQL optimizer
doesn't know about MERGE handler specific - and it shouldn't.
So, please, specify the same keys for MERGE table, you specified
for underlying tables.
Regards,
Sergei
--
MySQL Development Team
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/
/_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany
<___/
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php