Re: Optimising a two column OR check

2019-10-14 Thread Ivan Voras
On Sat, 12 Oct 2019 at 17:46, Andrew Gierth wrote: > > "MichaelDBA" == MichaelDBA writes: > > MichaelDBA> Nope, vacuumed it and still got the bitmap index scans. > > Let's see your explains. Here's mine: > > # set enable_seqscan=false; -- because I only have a few rows > SET > # insert in

Re: pg_stat_bgwriter

2019-10-14 Thread Tomas Vondra
On Mon, Oct 14, 2019 at 01:12:43PM -0700, dangal wrote: Thanks a lot, always helping I attached a snapshot that I take every 12 hours of the pg_stat_bgwriter select now,buffers_checkpoint,buffers_clean, buffers_backend from pg_stat_bgwriter_snapshot; Please show us the deltas, i.e. subtract th

Re: pg_stat_bgwriter

2019-10-14 Thread Justin Pryzby
On Mon, Oct 14, 2019 at 08:18:47PM +0200, Tomas Vondra wrote: > Note: FWIW, a single snapshot of pg_stats* may be misleading, because > it's cumulative, so it's not clear how accurately it reflects current > state. Next time take two snapshots and subtract them. For bonus points, capture it with t

Re: pg_stat_bgwriter

2019-10-14 Thread dangal
Thanks a lot, always helping I attached a snapshot that I take every 12 hours of the pg_stat_bgwriter select now,buffers_checkpoint,buffers_clean, buffers_backend from pg_stat_bgwriter_snapshot; now | buffers_checkpoint | buffers_clean | buffers_backend

Re: pg_stat_bgwriter

2019-10-14 Thread Tomas Vondra
On Sun, Oct 13, 2019 at 06:27:35PM -0700, dangal wrote: Dear I would like to share with you to see what you think about the statistics of pg_stat_bgwriter postgres = # select * from pg_stat_bgwriter;  checkpoints_timed | checkpoints_req | checkpoint_write_time | checkpoint_sync_time | buffers_ch