Василий Петров wrote:
You have not given us your table definitions or your queries. How are we supposed to answer your question.I have large "fact" table, in which there are much ids (that are in fact "foreign keys" but as long as I use MyISAM engine them are not technically). So when I try to join another table (that contains text descriptions for each id from one of "fact" columns, so it has two fields (id (PK) and name)) in my query, it chooses strange execution plan. When I do simple join, it uses my second table as first, scanning it and joining records from "fact" table by their "foreign" key. If I do straight join or left outer join it makes full scan of second table, ignorig its pk ("use key(primary)" doesn't help). I guess, standart execution plan for all such cases must be scan of first table joining all other description tables by their PKs.
Forgot to say that query fetches all data from "fact" table, grouping by some columns.
post your "show create table"s and the explains for your queries.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]