Michael A Chase wrote:

>
> > Sorry for interuption, would you tell more about why the database handles
> should
> > be openned in the children. I want to know more more about this. I just
> made
> > some changes to an Perl/DBI application so that it can run long processes
> of
> > executing big SQL statements. The change I made is that the only
> significant
> > line in the children is
> >
> >     $sth->execute();
> >
> > And it works.
>
> Maybe it works now.  I would not count on it without very extensive testing.
>
> Some databases, Oracle in particular, don't behave well with handles passed
> from parent to child.  See InactiveDestroy in the manual (perldoc DBI).

I use Solid version 2.2, not sure about Oracle though.

BTW, I have another issue concerning DBI need to consult your gurus. According
to the experts from the Solid company, for a statement if there are less than 10
values inside IN() in the WHERE clause, the solid version 2.2 engine will do
unions by each value, and this will take about 3 minutes for one of my SQL
statement when I run it from the Solid Editor. But, once there are more than 10
values inside IN(), for the same statement also running from the Solid editor it
would take forever, because the solid engine in this case will scan the whole
tables. The experts from the solid company told me I can change the default
value by running the statement

    SET SQL CONVERTORTOUNIONS YES COUNT 100

After I ran the above SQL statement via the Solid Editor to the database, my own
SQL statement with 21 values inside IN() only takes 6 minutes. But, the problem
is it still takes about one hour if I run my statement via DBI Perl application.
So, my question is, why there is a so big difference in time between the Solid
Editor and the DBI application? Or DBI has its own strategy to optimize query
plan? I noticed after the default value changed to 100, my DBI application runs
better (1 hour) than before (endless).

Any input from your gurus are highly appreciated.

Best

Bao
--
BAO RuiXian,  PROGRAMMER, Technologies Team, Project Services Group
AtBusiness Communications Corp., Kaapeliaukio 1, FIN-00180 Helsinki
tel. +358-9-2311 6674, mob. +358-50-329 6275,  fax +358-9-2311 6601
http://www.atbusiness.com, email: [EMAIL PROTECTED]


Reply via email to