Re: Optimizing CartoDB's JenksBins function
| От | Andy Colson |
|---|---|
| Тема | Re: Optimizing CartoDB's JenksBins function |
| Дата | |
| Msg-id | 5328BEE5.6050709@squeakycode.net обсуждение исходный текст |
| Ответ на | Re: Optimizing CartoDB's JenksBins function (Joe Conway <mail@joeconway.com>) |
| Список | pgsql-general |
On 3/18/2014 12:19 PM, Joe Conway wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 03/18/2014 09:42 AM, Seamus Abshere wrote: >> Our friends from CartoDB [1] provide a beautiful Jenks Natural >> Breaks function for Postgres [2]. It is quite computationally >> intensive. >> >> Even if you don't know what Jenks is, do you see any >> optimizations? > > Not exactly what you asked, but you might try PL/R with the R > "classInt" package: > > http://cran.at.r-project.org/web/packages/classInt/classInt.pdf > > HTH, > > Joe > Actually rewriting in any of the script languages might help. plpgsql is good a sql, but not so much with the math and string handling. I'm not sure about array's. It looks like most of that code is playing with arrays and math. I'd bet pl/perl (or R, python, javascript, etc) would run much faster. -Andy
В списке pgsql-general по дате отправления: