[CLUG-tech] SQL Query Question

Chris Meistre meistrch at intekom.co.za
Wed Dec 19 08:24:41 SAST 2007

G Christie wrote:
> 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.

I normally do this, but the table is much more complicated than I showed in the example though.  So for various reasons 
I cannot change the table's structure and I'm required to do at as mentioned.

More information about the clug-tech mailing list