Optimize this MySQL query?
Posted
by HipHop-opatamus
on Stack Overflow
See other posts from Stack Overflow
or by HipHop-opatamus
Published on 2010-04-13T00:47:26Z
Indexed on
2010/04/13
0:52 UTC
Read the original article
Hit count: 452
The following query takes FOREVER to execute (30+ hrs on a Macbook w/4gig ram) - I'm looking for ways to make it run more efficiently. Any thoughts are appreciated!
CREATE TABLE fc AS
SELECT threadid,
title,
body,
date,
userlogin
FROM f
WHERE pid
NOT IN (SELECT pid FROM ft) ORDER BY date;
(table "f" is ~1 Gig / 1,843,000 row, table "ft" is 168mb, 216,000 rows) )
© Stack Overflow or respective owner