> I don't know if this is the way to trespond to your question and I
> apologize
> in advance if this is not appropriate.
>
> I've got a question regarding SQL*PLUS and DBI
> The following query in Oracle, using sql*plus, takes 2.3 seconds.
>
> Using perl DBI, it takes over 4 minutes.
>
> Any ideas what to do?
>
> $oracle_query = 'select c.object_name,c.column_name, c.column_desc
> from abbr_ref b, meta_column_master c, meta_node_ref o
> where (b.word like \'%'.$wanted_value.'%\'
> or b.abbr like \''.$wanted_value.'%\'
> or c.column_name like \''.$wanted_value.'\'
> or upper(c.bus_name) like \'%'.$wanted_value.'%\'
> or upper(c.column_desc) like \'%'.$wanted_value.'%\')
> and b.abbr = o.node
> and o.column_name like c.column_name
> group by c.object_name,c.column_name,c.column_desc
> order by 1,2,3';
>
>
> I am using the following to fetch the rows:
> while(($object_name,$column_name,$column_desc) = $sth->fetchrow_array) {
> etc ...
>
> Thanks,
> Hal Beck
>
> *****************
> [EMAIL PROTECTED] wrote:
>
> >>-----Original Message-----
> >>From: Joseph Bajin [mailto:[EMAIL PROTECTED]]
> >>Sent: Monday, June 03, 2002 2:34 PM
> >>To: [EMAIL PROTECTED]
> >>Subject: Perl DBI vs SQLPLUS
> >>
> >>
> >>Got a question for you guys out there.
> >>
> >>I currently have a list of records that I need to search for in a
> >>mult-db that we have. I was wondering if perl would be faster
> >>to process
> >>or stick with my .ksh script that uses sqlplus. Here's how
> >>the current
> >>setup is
> >>
> >>cat input file and read for record #
> >>
> >>sqlplus into db1 and do a select statement to find what db that the
> >>account is located in. (This db just contains basic info on where the
> >>account is actually stored)
> >>
> >>exit sql plus
> >>
> >>open another sqlplus session to db that was found in previous select
> >>statement.
> >>
> >>select out data needed and write to a file.
> >>
> >>exit sqlplus
> >>
> >>Do the loop again.
> >>
> >>
> >>I needed to process about 8000 records today. It would get about 30%
> >>through and the process would just stop. Don't know if it's a buffer
> >>issue (that was a suggestion) or if perl because it will directly
> >>connect to the DB would be better.
> >>
> >>Got any ideas.
> >>
> >
> >Can't say why it's hanging, but using DBI should be faster than
> >what you're doing, because you can keep a database connection
> >open (at least on db1). How many total databases are there?
> >
> Total of 8 databases. The first database is used only to reference where
> the rest of the data is located. ie (record is located on Db4, and so on.
> )
>
> Thanks Joe
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]