Can anyone tell me which of the following would generally be faster? I do not know what my client has done to optimize mysql. Their mysql is running on a Sun E450 with 4 sparc 450 and 4 gigs of ram.
from_id is an int and to_id is the primary key in the table.
replace into [table] (to_id) select from_id from ....
This result set could have as many as 300,000 rows.
or
insert into [table] (to_id) select distinct from_id from ....
This result set could has as many as 100,000 rows.
Query speed: replace into vs insert into ... select distinct
Moderator: General Moderators
-
sunderwind
- Forum Newbie
- Posts: 9
- Joined: Thu Aug 29, 2002 4:24 am
- Location: Irving, TX
- Contact: