Re: Which one of these two queries would be fastest?

2005-03-19 Thread Martijn Tonies
> Assuming everything is properly indexed. > > (1) INSERT INTO my_table_1 (field1, field2) SELECT DISTINCT field1, > field2 FROM my_table_2; > > or > > (2) INSERT IGNORE INTO my_table_1 (field1, field2) SELECT field1, > field2 FROM my_table_2; > > Is there anything to say about this in a general

Which one of these two queries would be fastest?

2005-03-19 Thread Jan Pieter Kunst
Assuming everything is properly indexed. (1) INSERT INTO my_table_1 (field1, field2) SELECT DISTINCT field1, field2 FROM my_table_2; or (2) INSERT IGNORE INTO my_table_1 (field1, field2) SELECT field1, field2 FROM my_table_2; Is there anything to say about this in a general sense, or does it al

Which one of these two queries would be fastest?

2005-03-18 Thread Jan Pieter Kunst
Assuming everything is properly indexed. (1) INSERT INTO my_table_1 (field1, field2) SELECT DISTINCT field1, field2 FROM my_table_2; or (2) INSERT IGNORE INTO my_table_1 (field1, field2) SELECT field1, field2 FROM my_table_2; Is there anything to say about this in a general sense, or does it al