[PERFORM] Should I generate strings in Postgres of Python?

2016-10-18 Thread Bobby Mozumder
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. Th

[PERFORM] Possible to find disk IOs for a Query?

2016-08-31 Thread Bobby Mozumder
Is it possible to find the number of disk IOs performed for a query? EXPLAIN ANALYZE looks like it shows number of sequential rows scanned, but not number of IOs. My database is on an NVMe SSD, and am trying to cut microseconds of disk IO per query by possibly denormalizing. Thank you, -bo