Fast check for existing rows
From: Timo Nentwig (tcn_at_spamgourmet.com)
Date: 02/17/04
- Next message: Timo Nentwig: "Re: Fast check for existing rows"
- Previous message: Andrea Maschio: "Trouble with applet connecting through SQL Server - Please help!"
- Next in thread: Timo Nentwig: "Re: Fast check for existing rows"
- Reply: Timo Nentwig: "Re: Fast check for existing rows"
- Reply: Ruud de Koter: "Re: Fast check for existing rows"
- Reply: Robert Klemme: "Re: Fast check for existing rows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 17 Feb 2004 12:35:11 +0100
Hi!
I extract word from a lot of long texts and insert them into a table - each
word only once.
What is the fastest method in order to check whether the word already is in
database?
1) auto-commit is that slow that it must be disabled
2) a SELECT prior to the INSERT also is extraordinary slow
3) adding a unique key and catching the exception is
a) slow as well :)
b) in case of Postgres the entire transaction is rolled back (see 1).
c) the exception may have other causes, too..
Any solution to this problem?
TIA
Timo
- Next message: Timo Nentwig: "Re: Fast check for existing rows"
- Previous message: Andrea Maschio: "Trouble with applet connecting through SQL Server - Please help!"
- Next in thread: Timo Nentwig: "Re: Fast check for existing rows"
- Reply: Timo Nentwig: "Re: Fast check for existing rows"
- Reply: Ruud de Koter: "Re: Fast check for existing rows"
- Reply: Robert Klemme: "Re: Fast check for existing rows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]