[CLUG-tech] SQL Query Question

G Christie gcchristie at gmail.com
Wed Dec 19 08:17:21 SAST 2007


On Tue, Dec 18, 2007 at 10:49:14PM +0200, Chris Meistre wrote:

> This gives me all the rows in table1 that haven't been put into table2.
> Now, this works but takes ages to run.   Can anyone help me with a
> better, quicker query?

You can also try creating / using an index on the url field in both tables.
This should speed up row matching.

Personally I prefer creating a auto incrementing integer RowID as the
primary key on tables with hundreds of thousands of rows which is
usually much faster than text based matches.


More information about the clug-tech mailing list