Re: [PERFORM] Hibernate generated query slow compared to 'equivalent' hand written one

2016-10-14 Thread Tom Lane
Kyle Moser writes: > Thanks so much for the response. They are the same data, that was due to > deidentification on my part. So even though the second Hibernate query says > "index only scan" (in addition to the filter, as you said) it is > inefficient. Why does it say index only scan if it can't

Re: [PERFORM] Hibernate generated query slow compared to 'equivalent' hand written one

2016-10-14 Thread Kyle Moser
Tom, Thanks so much for the response. They are the same data, that was due to deidentification on my part. So even though the second Hibernate query says "index only scan" (in addition to the filter, as you said) it is inefficient. Why does it say index only scan if it can't use the index due to t

Re: [PERFORM] Hibernate generated query slow compared to 'equivalent' hand written one

2016-10-14 Thread Tom Lane
Kyle Moser writes: > The depesz link for explain (analyze, buffers) is shown below for 3 > different queries. The first two queries show a log dump of the postgres > log, showing a query that was generated by Java Hibernate. The third query > was one I wrote and ran in pgadmin that I think is simi

[PERFORM] Hibernate generated query slow compared to 'equivalent' hand written one

2016-10-14 Thread Kyle Moser
The depesz link for explain (analyze, buffers) is shown below for 3 different queries. The first two queries show a log dump of the postgres log, showing a query that was generated by Java Hibernate. The third query was one I wrote and ran in pgadmin that I think is similar to what Hibernate is doi

Re: [PERFORM] pg_basebackup running slow

2016-10-14 Thread Michael Paquier
On Fri, Oct 14, 2016 at 10:21 PM, Samir Magar wrote: > What is the settings for max_wal_sender? > you can try increasing this parameter to improve backup performance. max_wal_senders has no influence on the performance of a base backup taken as a base backup is just sent through one single WAL se

Re: [PERFORM] pg_basebackup running slow

2016-10-14 Thread Stephen Frost
Vaze, * Swapnil Vaze (swapvaz...@gmail.com) wrote: > We are using postgresql 9.2 on redhat linux instance over openstack cloud. > > Database is around 441 GB. > > We are using below command to take backup: > > pg_basebackup -v -D /pgbackup/$bkupdir -Ft -z -c fast > > Backup size created is aro

Re: [PERFORM] pg_basebackup running slow

2016-10-14 Thread Samir Magar
What is the settings for max_wal_sender? you can try increasing this parameter to improve backup performance. Thanks, Samir Magar On Fri, Oct 14, 2016 at 6:05 PM, Swapnil Vaze wrote: > Hello, > > > > We are using postgresql 9.2 on redhat linux instance over openstack cloud. > > > > Database is

[PERFORM] pg_basebackup running slow

2016-10-14 Thread Swapnil Vaze
Hello, We are using postgresql 9.2 on redhat linux instance over openstack cloud. Database is around 441 GB. We are using below command to take backup: pg_basebackup -v -D /pgbackup/$bkupdir -Ft -z -c fast Backup size created is around 84GB. However, it is taking almost 10 hr 21 m