One db too many
Date: Mon, 14 Jan 2002 10:10:40 +0100
Message-ID: <3c42a03e$1_at_d2o29.telia.com>
Hi all,
I am stuck here with a slight performance problem. I have a two-database
environment, the big O and the free My alternative...moving all of the data
to Oracle is unfortunately not an option for various reasons.
I have a perl script that interacts with both databases. It retrieves a list
of id numbers from the mysql database and puts these in an array. The number
of ids can be anything from 5 to 50,000. I now want to do this:
SELECT DISTINCT field FROM table WHERE id IN (<ids in array>)
table is a ~1.2 million rows Oracle table, primary key on id of course.
So far i have tried the following:
Is there a 4th, 5th, 6th, ... alternative or is there a way to improve 3)?
Any and all hints/suggestions would be appreciated.
Thanks in advance,
Joakim Mared
Received on Mon Jan 14 2002 - 10:10:40 CET
Ids joined to a long comma-delimited string. This works well until number of
ids > 1000 and i get "ORA-01795: maximum number of expressions in a list is
1000"