Re: pg_replication_slots

2017-11-29 Thread Emanuel Alvarez
On Wed, Nov 29, 2017 at 12:39 PM, Nicola Contu wrote: > Hello, Hi! > I just have few questions on the replication slots : > > - is it possible to get size of the slot? I use something like this to know where my slot is at: SELECT pg_xlog_location_diff(pg_current_xlog_location(), restart_lsn)

Re: seq vs index scan in join query

2017-11-29 Thread Emanuel Alvarez
Thank you all for your responses! On Wed, Nov 29, 2017 at 7:31 AM, legrand legrand wrote: > Hi, > > Could you give us the partitions (ranges values) and indexes definition for > result table ? We partition by month, they usually start the 20th of each month (this was the date we partitioned the

seq vs index scan in join query

2017-11-28 Thread Emanuel Alvarez
hi all, we're in the process of optimizing some queries and we've noted a case where the planner prefers a sequential scan instead of using an index, while the index scan is actually much faster. to give you some context: we have two main tables, keywords and results. keywords has approximately 70