List:General Discussion« Previous MessageNext Message »
From:BAUMEISTER Alexandre Date:October 5 2002 1:08pm
Subject:INSERT INTO ... SELECT not creating indexes ?
View as plain text  
Bonjour,

  When  I insert a lot of rows in a table from another table in MyISAM
  format  it  seems  that  indexes  in  the  destination table are not
  updated.

  For  example  in  table  A  I have index 1. This table contains many
  rows.

  I have table B with same structure as table A but empty.

  INSERT INTO TABLE B SELECT * FROM TABLE A;

  There  if  I do a select using index 1 on table B it's very long and
  "explain"  on the query shows me that even if it knows about index 1
  it's not using it.

  The  solution  is  to  do  a  "optimize" on table B but I wonder why
  indexes  are not up to date after the "insert into ... select" query
  ?

  Thanks for you enlightenment :)

  Kinds regards,
  Alex.

Thread
ERROR 1: Can't create/write to file <tmpdir><file> (Errcode: 13)Stephan Gloor4 Oct
  • Re: ERROR 1: Can't create/write to file <tmpdir><file> (Errcode:13)Thomas Spahni4 Oct
    • Re: ERROR 1: Can't create/write to file <tmpdir><file> (Errcode: 13)Stephan Gloor5 Oct
    • Re: ERROR 1: Can't create/write to file <tmpdir><file> (Errcode:13)Joseph Bueno5 Oct
      • INSERT INTO ... SELECT not creating indexes ?BAUMEISTER Alexandre5 Oct
    • Re: ERROR 1: Can't create/write to file <tmpdir><file> (Errcode: 13)Stephan Gloor5 Oct