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

From: Roberto Mello <roberto(dot)mello(at)gmail(dot)com>
To: testman1316 <danilo(dot)ramirez(at)hmhco(dot)com>
Cc: "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 12:46:49
Message-ID: CAKz==bJ+pyk=ninFRs1nTpBG0hm4eefaLY9-nyae5wShTo7_pA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em segunda-feira, 4 de agosto de 2014, testman1316 <danilo(dot)ramirez(at)hmhco(dot)com>
escreveu:

>
> SET SERVEROUTPUT ON
> SET TIMING ON
>
> DECLARE
> n NUMBER := 0;
> BEGIN
> FOR f IN 1..10000000
> LOOP
> n := SQRT (f);
> END LOOP;
>
>
In addition to the other suggestions that have been posted (using a
procedural language more suitable to mathematical ops, etc) I noticed that
you are using a RAISE in the PostgreSQL version that you are not in Oracle.

I am curious as to what the difference is if you use the RAISE in both or
neither cases.

Roberto

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2014-08-05 12:50:21 Re: WAL format and API changes (9.5)
Previous Message Fujii Masao 2014-08-05 12:06:51 Re: pg_receivexlog add synchronous mode