Hi,
Without seeing your sql statement(s) and how your database is setup
there is only so much that one can infer as to the problem. It could be
cause by your database, or even your network if the other databases are on
slow network. I've a oracle 8i database with over 10 millions rows in
many of the tables I'm querying and its runs quite well with perl dbi.
Even when I make joins across two different oracle database the speed of
the query is fine. It all depend on the way the database is setup
(tables,tablespace,indexes) and how your query is written.
Michael
> I am also facing this kind of stuff. But I see the problem in SELECT only.
> I am joining 6 tables some of them from other databases. and when I run the
> query on SQL client it takes time but not that much the perl DBI is taking.
> ofcourse my oracle database contains millions of records. Is that the
> problem?
>
> Regards,
> Prem
>
>
>
>
> -----Original Message-----
> From: Michelle Gerfort [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 12, 2001 9:29 AM
> To: Michael Nhan; [EMAIL PROTECTED]
> Subject: Re: Slow execution
>
>
> Actually the sqlstatement takes a while with the sqlplus as well, so I guess
> it might be a tuning issue.
> Anyway, Here is a snip of my code, with a lot of time checks:
>
> ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
> localtime(time);
> print "Time before preparing sqlstatement: $hour $min $sec <br>";
>
> my $sth = $dbh->prepare( $sql );
> print "$sql <br>";
>
> ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
> localtime(time);
> print "Time before executing the sqlstatement: $hour $min $sec <br>";
>
> $sth->execute();
>
> ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
> localtime(time);
> print "Time after executing the sqlstatement, before binding to columns:
> $hour $min $sec <br>";
>
> $sth->bind_columns( @AllBcol );
>
> ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
> localtime(time);
> print "Time after binding to columns: $hour $min $sec <br>";
>
> I can se in the time-outputs, that it takes a very long time doing the
> execution
>
> /Michelle
>
> Michael Nhan wrote:
>
> > Hi,
> >
> > Can you post snipet of code so we can assist you? Include the sql
> > statement if possible? Does the same statement work quickly on sqlplus?
> > If not then its probably a sql statement/database tuning issue.
> >
> > Michael
> >
> > On Tue, 12 Jun 2001, Michelle Gerfort wrote:
> >
> > > Date: Tue, 12 Jun 2001 15:17:28 +0200
> > > From: Michelle Gerfort <[EMAIL PROTECTED]>
> > > To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > > Subject: Slow execution
> > >
> > > Hi there
> > >
> > > I use an ordinary
> > > $sth->execute();
> > > but it seems to take ages to search, creating or updating a post.
> > > Is this problem due to the sqlstatement or is it a known problem with a
> > > perl DBI interface?
> > >
> > > I run Oracle 7.3.3 on an AIX 4.2 with roxen as webserver.
> > >
> > > --
> > > MVH
> > > Michelle
> > >
> > > -----------------------------------
> > > Michelle Gerfort
> > > Software Engineer
> > >
> > > Teligent AB
> > > P.O. Box 1191
> > > SE-581 11 Linköping, Sweden
> > >
> > > www.teligent.se
> > >
> > >
> > >
>
> --
> MVH
> Michelle
>
> -----------------------------------
> Michelle Gerfort
> Software Engineer
>
> Teligent AB
> P.O. Box 1191
> SE-581 11 Linköping, Sweden
>
> www.teligent.se
>
>