Re: PostrgeSQL vs oracle doing 1 million sqrts am I doing it wrong? - Mailing list pgsql-hackers

From Roberto Mello
Subject Re: PostrgeSQL vs oracle doing 1 million sqrts am I doing it wrong?
Date
Msg-id CAKz==bJ+pyk=ninFRs1nTpBG0hm4eefaLY9-nyae5wShTo7_pA@mail.gmail.com
Whole thread Raw
In response to PostrgeSQL vs oracle doing 1 million sqrts am I doing it wrong?  (testman1316 <danilo.ramirez@hmhco.com>)
Responses Re: PostrgeSQL vs oracle doing 1 million sqrts am I doing it wrong?
List 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 

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: pg_receivexlog add synchronous mode
Next
From: Michael Paquier
Date:
Subject: Re: WAL format and API changes (9.5)