Re: Sun acquires MySQL

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Alex Turner <armtuk(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Martin Gainty <mgainty(at)hotmail(dot)com>, walterbyrd <walterbyrd(at)iname(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Sun acquires MySQL
Date: 2008-01-21 08:16:55
Message-ID: 20080121081655.GA6305@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)svana(dot)org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sim Zacks 2008-01-21 08:24:04 Re: planner and simple vs. complex statement was: example query for postgresql
Previous Message Albe Laurenz 2008-01-21 08:15:44 Re: Trouble with UTF-8 data