Re: [PERFORM] Searching GIN-index (FTS) and sort by timestamp-column

2016-03-19 Thread Tom Lane
Andreas Joseph Krogh writes: > 1. Why isnt' folder_id part of the index-cond? Because a GIN index is useless for sorting. > 2. Is there a way to make it use the (same) index to sort by > received_timestamp? No. > 3. Using a GIN-index, is there a way to use the index at all for sorting? No.

[PERFORM] Disk Benchmarking Question

2016-03-19 Thread Dave Stibrany
I'm pretty new to benchmarking hard disks and I'm looking for some advice on interpreting the results of some basic tests. The server is: - Dell PowerEdge R430 - 1 x Intel Xeon E5-2620 2.4GHz - 32 GB RAM - 4 x 600GB 10k SAS Seagate ST600MM0088 in RAID 10 - PERC H730P Raid Controller with 2GB cache

Re: [PERFORM] Performance decline maybe caused by multi-column index?

2016-03-19 Thread Jeff Janes
On Fri, Mar 18, 2016 at 6:26 AM, Jan Bauer Nielsen wrote: > Hi, > > While developing a batch processing platform using postgresql as the > underlying data store we are seeing a performance decline in our > application. > > In this application a job is broken up into chunks where each chunk contain

[PERFORM] Performance decline maybe caused by multi-column index?

2016-03-19 Thread Jan Bauer Nielsen
Hi, While developing a batch processing platform using postgresql as the underlying data store we are seeing a performance decline in our application. In this application a job is broken up into chunks where each chunk contains a number of items (typically 10). CREATE TABLE item ( id

[PERFORM] Nested Loop vs Hash Join based on predicate?

2016-03-19 Thread Doiron, Daniel
I have the following queries: EXPLAIN (ANALYZE, VERBOSE, COSTS, BUFFERS, TIMING) select[…] from f_calc_service a11, d_patient_typea12 where a11.d_patient_pop_id in (336) and a11.d_

Re: [PERFORM] Disk Benchmarking Question

2016-03-19 Thread Mike Sofen
Hi Dave, Database disk performance has to take into account IOPs, and IMO, over MBPs, since it’s the ability of the disk subsystem to write lots of little bits (usually) versus writing giant globs, especially in direct attached storage (like yours, versus a SAN). Most db disk benchmarks rev

Re: [PERFORM] Searching GIN-index (FTS) and sort by timestamp-column

2016-03-19 Thread Evgeniy Shishkin
> On 16 Mar 2016, at 16:37, Tom Lane wrote: > > Andreas Joseph Krogh writes: >> 1. Why isnt' folder_id part of the index-cond? > > Because a GIN index is useless for sorting. I don't see how gin inability to return sorted data relates to index condition. In fact i tried to reproduce the examp

Re: [PERFORM] Nested Loop vs Hash Join based on predicate?

2016-03-19 Thread Pavel Stehule
2016-03-16 21:23 GMT+01:00 Doiron, Daniel : > I have the following queries: > > EXPLAIN (ANALYZE, VERBOSE, COSTS, BUFFERS, TIMING) > select[…] > from f_calc_service a11, > d_patient_typea12 > where a11.d_p

Re: [PERFORM] using shared_buffers during seq_scan

2016-03-19 Thread Rick Otten
There is parallel sequence scanning coming in 9.6 -- http://rhaas.blogspot.com/2015/11/parallel-sequential-scan-is-committed.html And there is the GPU extension - https://wiki.postgresql.org/wiki/PGStrom If those aren't options, you'll want your table as much in memory as possible so your scan d

[PERFORM] using shared_buffers during seq_scan

2016-03-19 Thread Artem Tomyuk
Hi All! Is Postgres use shared_buffers during seq_scan? In what way i can optimize seq_scan on big tables? Thanks!

Re: [PERFORM] Searching GIN-index (FTS) and sort by timestamp-column

2016-03-19 Thread Evgeniy Shishkin
> On 16 Mar 2016, at 17:52, Evgeniy Shishkin wrote: > > >> On 16 Mar 2016, at 16:37, Tom Lane wrote: >> >> Andreas Joseph Krogh writes: >>> 1. Why isnt' folder_id part of the index-cond? >> >> Because a GIN index is useless for sorting. > > I don't see how gin inability to return sorted da

Re: [PERFORM] Searching GIN-index (FTS) and sort by timestamp-column

2016-03-19 Thread Andreas Joseph Krogh
På onsdag 16. mars 2016 kl. 14:37:27, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: Andreas Joseph Krogh writes: > 1. Why isnt' folder_id part of the index-cond? Because a GIN index is useless for sorting. > 2. Is there a way to make it use the (same) index to sort by > received_timestamp? N

Re: [PERFORM] using shared_buffers during seq_scan

2016-03-19 Thread Albe Laurenz
Artem Tomyuk wrote: > Is Postgres use shared_buffers during seq_scan? > In what way i can optimize seq_scan on big tables? If the estimated table size is less than a quarter of shared_buffers, the whole table will be read to the shared buffers during a sequential scan. If the table is larger tha

Re: [PERFORM] Searching GIN-index (FTS) and sort by timestamp-column

2016-03-19 Thread Andreas Joseph Krogh
På onsdag 16. mars 2016 kl. 16:04:08, skrev Evgeniy Shishkin < itparan...@gmail.com >: > On 16 Mar 2016, at 17:52, Evgeniy Shishkin wrote: > > >> On 16 Mar 2016, at 16:37, Tom Lane wrote: >> >> Andreas Joseph Krogh writes: >>> 1. Why isnt' folder_id part of t

[PERFORM] grant select on pg_stat_activity

2016-03-19 Thread avi Singh
Guys Whats the best way to grant select on pg_stat_activity so that non super user can access this view. Thanks Avi

Re: [PERFORM] Disk Benchmarking Question

2016-03-19 Thread Scott Marlowe
On Sat, Mar 19, 2016 at 4:29 AM, Scott Marlowe wrote: > Given the size of your bonnie test set and the fact that you're using > RAID-10, the cache should make little or no difference. The RAID > controller may or may not interleave reads between all four drives. > Some do, some don't. It looks to

Re: [PERFORM] Disk Benchmarking Question

2016-03-19 Thread Scott Marlowe
On Thu, Mar 17, 2016 at 2:45 PM, Dave Stibrany wrote: > I'm pretty new to benchmarking hard disks and I'm looking for some advice on > interpreting the results of some basic tests. > > The server is: > - Dell PowerEdge R430 > - 1 x Intel Xeon E5-2620 2.4GHz > - 32 GB RAM > - 4 x 600GB 10k SAS Seag

Re: [PERFORM] Disk Benchmarking Question

2016-03-19 Thread Dave Stibrany
Hey Mike, Thanks for the response. I think where I'm confused is that I thought vendor specified MBps was an estimate of sequential read/write speed. Therefore if you're in RAID10, you'd have 4x the sequential read speed and 2x the sequential write speed. Am I misunderstanding something? Also, wh

Re: [PERFORM] Searching GIN-index (FTS) and sort by timestamp-column

2016-03-19 Thread Tom Lane
Evgeniy Shishkin writes: > Uh, it works if i cast to bigint explicitly FWIW, the reason for that is that the int8_ops operator class that btree_gin creates doesn't contain any cross-type operators. Probably wouldn't be that hard to fix if somebody wanted to put in the work.

Re: [PERFORM] [GENERAL] grant select on pg_stat_activity

2016-03-19 Thread Adrian Klaver
On 03/18/2016 01:09 PM, avi Singh wrote: Guys Whats the best way to grant select on pg_stat_activity so that non super user can access this view. They should be able to, see below. If that is not your case, then more information is needed. guest@test=> select current_user; current_