Search Postgresql Archives

Re: Optimizing CartoDB's JenksBins function

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

 



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



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[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