Reputation
29,026
Next tag badge:
447/400 score
77/80 answers
Badges
3 43 81
Newest
 Good Answer
Impact
~1.1m people reached

1d
awarded  Good Answer
May
20
awarded  Nice Answer
May
20
revised Optimize view (and underlying table) for averaging timestamps into hours
edited body
May
20
revised Optimize view (and underlying table) for averaging timestamps into hours
trim noise, add tag, format code
May
20
revised Optimize view (and underlying table) for averaging timestamps into hours
much more
May
20
answered Optimize view (and underlying table) for averaging timestamps into hours
May
20
comment Optimize view (and underlying table) for averaging timestamps into hours
1. Why would you use the reserved word (in standard SQL) interval as column name for a timestamp? That's backwards twice. 2. Why do you subtract 5 minutes from interval before you aggregate? There is nothing in the explanation for this odd move.
May
19
comment Optimize view (and underlying table) for averaging timestamps into hours
rtprices_node_id_interval_idx does not seem to be the underlying index of the PK on ("interval", node_id)? Please also provide the definition of all relevant indexes on the table. The order of index columns is important.
May
19
revised Optimize view (and underlying table) for averaging timestamps into hours
add tag, minor edits
May
19
revised Confused over encoding/locale in postgresql
edited tags
May
19
revised How to use Italian locale for Postgres messages
add tag, clean up
May
19
comment How to index for timestamp queries
@user1157575: added the missing condition in a cheaper fashion. Since we already operate on a window, using the same for another window function is very cheap: AND (lead(id) OVER w) IS NOT NULL. Consider the updated query. It should be substantially faster than what you had - compare apples to apples, so my function without explicit locking.
May
19
revised How to index for timestamp queries
add condition & explain
May
19
revised How to index for timestamp queries
added 19 characters in body
May
19
revised How to use Italian locale for Postgres messages
add link and more
May
19
comment How to use Italian locale for Postgres messages
This is a misunderstanding. Quoting the manual about that setting here: If you do not specify a list, then all available translations are installed. It is enabled in any standard distribution of modern Postgres.
May
19
comment How to use Italian locale for Postgres messages
@elbarna: Sorry, provided the tested version. This has been working with any other standard distribution of Postgres since at leas Postgres 9.1 (probably longer).
May
19
revised How to use Italian locale for Postgres messages
added 48 characters in body
May
19
answered How to use Italian locale for Postgres messages
May
19
revised How to index for timestamp queries
index