Should I generate strings in Postgres of Python?

Поиск
Список
Период
Сортировка
От Bobby Mozumder
Тема Should I generate strings in Postgres of Python?
Дата
Msg-id 964DB65A-9A61-42EF-9803-5CE99F564727@gmail.com
обсуждение исходный текст
Ответы Re: Should I generate strings in Postgres of Python?  (Sam Gendler <sgendler@ideasculptor.com>)
Список pgsql-performance
How fast is Postgres's string concatenation in comparison to the various Python string concatenation?  I'm using
PREPAREstatements 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.
Thiswould 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
futureJIT compilers like PyPy).  Is Postgres generating bytecode and interpreting that for string concatenation & Case
statements?

-bobby

В списке pgsql-performance по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Hibernate generated query slow compared to 'equivalent' hand written one
Следующее
От: Sam Gendler
Дата:
Сообщение: Re: Should I generate strings in Postgres of Python?