Re: pro C versus PL/SQL
Date: Tue, 25 Mar 2003 20:14:54 -0000
Message-ID: <3e80bb1d_1_at_mk-nntp-1.news.uk.worldonline.com>
"Lolita" <lolitagroux_at_hotmail.com> wrote in message
news:8027ad1.0303231736.5f93cf4d_at_posting.google.com...
> Hi,
>
> I am testing a part of code in pro C and PL/SQL. The code in C takes 2
> minutes to execute while the PL/SQL code takes 7 minutes.
> It would be really easier to code and manage if the program could be
> written in PL/SQL. I would like to know if it is possble to improve
> the PL/SQL performance.
>
> The code does the following:
> 1- Select the data from the database
> 2- For each record seleted it looks through a serie of elsif
> statement, if the record meets the criteria of one elsif statement,
> the data of this record is updated into the database. There can be up
> to 300 elsif statements.
>
> Number 2 takes most of the time.
>
> My questions are the following:
>
> 1- Why C is more performant than PL/SQL?
> 2- Would it be faster to use else if statments instead of elsif
> statments?
> 3- Would it be better to store all the records that have met a elsif
> statment into a PL/SQL table and then loop through the table to update
> them into the database? There can be up to 60000 records to put in the
> PL/SQL.
>
> Thanks in advance
> Lolita
Not really enough information to go on here. Would it be possible to:
- Put your 300 elsifs into a table
- Do it in SQL instead of row-at-a-time?
I'd have thought that the time taken to update 60000 rows from a 300 row lookup table would be measured in seconds, not minutes.
Regards,
Paul
Received on Tue Mar 25 2003 - 21:14:54 CET