Should I generate strings in Postgres of Python?

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

 



How fast is Postgres's string concatenation in comparison to the various Python string concatenation?  I'm using PREPARE statements for my SELECT queries for my web server.

I'm wondering if I should just generate my JSON API (or even HTML) strings in Postgres directly, instead of in Python.  This would involve a few IF-THEN-ELSE (in Python) which I convert to CASE-WHEN (in Postgres) as well.

I’m not sure about the internals of Postgres and how it compares speedwise to the Python bytecode interpreter (and future JIT compilers like PyPy).  Is Postgres generating bytecode and interpreting that for string concatenation & Case statements?

-bobby

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




[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux