Re: Sun acquires MySQL
От | Martijn van Oosterhout |
---|---|
Тема | Re: Sun acquires MySQL |
Дата | |
Msg-id | 20080121081655.GA6305@svana.org обсуждение исходный текст |
Ответ на | Re: Sun acquires MySQL ("Alex Turner" <armtuk@gmail.com>) |
Список | 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@svana.org> http://svana.org/kleptog/ > Those who make peaceful revolution impossible will make violent revolution inevitable. > -- John F Kennedy
Вложения
В списке pgsql-general по дате отправления: