Re: PostrgeSQL vs oracle doing 1 million sqrts am I doing it wrong?

From: Roberto Mello <roberto(dot)mello(at)gmail(dot)com>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: testman1316 <danilo(dot)ramirez(at)hmhco(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PostrgeSQL vs oracle doing 1 million sqrts am I doing it wrong?
Date: 2014-08-05 14:02:21
Message-ID: CAKz==b+TUhpW2NrgC+dg3waRGiWPaYsgshzAsJo-PCy0yN33VA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 5, 2014 at 9:50 AM, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:
>
> Since that is outside the loop, the difference should be nominal;

Apologies. I misread on my phone and though it was within the loop.

> and in a quick test it was. On the other hand, reducing the
> procedural code made a big difference.

<snip>

> test=# DO LANGUAGE plpgsql $$ DECLARE n real;
> BEGIN
> PERFORM SQRT(f) FROM generate_series(1, 10000000) x(f);
> END $$;
> DO
> Time: 3916.815 ms

That is a big difference. Are you porting a lot of code from PL/SQL,
and therefore evaluating the performance difference of running this
code? Or is this just a general test where you wish to assess the
performance difference?

PL/pgSQL could definitely use some loving, as far as optimization
goes, but my feeling is that it hasn't happened because there are
other suitable backends that give the necessary flexibility for the
different use cases.

Roberto

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message 土卜皿 2014-08-05 14:08:47 how to debug into InitPostgres() and InitCatalogCache()?
Previous Message Kevin Grittner 2014-08-05 13:50:49 Re: PostrgeSQL vs oracle doing 1 million sqrts am I doing it wrong?