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

Roberto Mello <roberto.mello@gmail.com>

From: Roberto Mello <roberto.mello@gmail.com>
To: testman1316 <danilo.ramirez@hmhco.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2014-08-05T12:46:49Z
Lists: pgsql-hackers
Em segunda-feira, 4 de agosto de 2014, testman1316 <danilo.ramirez@hmhco.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