View Single Post

   
  #3 (permalink)  
Old 04-09-2008, 06:35 AM
Jon Lapham
 
Posts: n/a
Default Re: How much slower are numerics?

Tom Lane wrote:
> On modern hardware, I'd expect float operations to be at least an order
> of magnitude faster than numerics
> [snip]
> regression$# declare x float8 := 0;
> regression=# select timeit(1000000);
> Time: 13700.960 ms
> [snip]
> regression$# declare x numeric := 0;
> regression=# select timeit(1000000);
> Time: 22145.408 ms


But, this is less than a factor of 2 difference, similar to what one of
the previous INSERT examples showed. Or am I missing something?

--
-**-*-*---*-*---*-*---*-----*-*-----*---*-*---*-----*-----*-*-----*---
Jon Lapham <lapham@jandr.org> Rio de Janeiro, Brasil
Personal: http://www.jandr.org/
***-*--*----*-------*------------*--------------------*---------------


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply With Quote