Search Postgresql Archives

Re: Sun acquires MySQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 21, 2008 at 02:47:32AM -0500, Alex Turner wrote:
> My one biggest bone to pick with Postgresql is
> that stored procedures are not compiled. 

I'm not going go into this since in my experience they are fast enough
and I don't know enough of your context to decide if the problem has
been correctly diagnosed. plpgsql is not the fastest language supprted
by postgres.

> It makes writing anything but the
> most trivial things in plpgsql stupid because it will slow the crap out of
> your queries. For example: I wrote a simple function to return the distance
> between two lat longs in plpgsql. 

Wrong tool for the job? If it's a single statement you should be using
lang 'sql' which would allow it to be inlined in your queries. I've
personally not found plpgsql to be so slow.

In this case, I would simply install postgis and you get all the speed
you need:

# select distance_sphere( makepoint(0,0), makepoint(0,180));
 distance_sphere
------------------
 20015045.5917028
(1 row)

> Not only did it choke on values that were
> part of a valid domain when calling acos() (I have a list of them someplace
> that I keep meaning to post as it seems like a really bad bug), it was
> slow. 

Please report such bugs, since no-one else has seen this problem...

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
>  -- John F Kennedy

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux