Re: [PERFORM] Performance of a large array access by position (tested version 9.1.3)

2012-06-28 Thread Cédric Villemain
Is that behaviour is correct? yes - access to n position means in postgresql - skip n-1 elements Hmmm... how many elements to be skipped here ? there are two independent stages: a) detoast - loading and decompression (complete array is detoasted) b) access if you has

Re: [PERFORM] Performance of a large array access by position (tested version 9.1.3)

2012-06-26 Thread Marc Mamin
On 22/06/12 09:02, Maxim Boguk wrote: May be I completely wrong but I always assumed that the access speed to the array element in PostgreSQL should be close to constant time. But in tests I found that access speed degrade as O(N) of array size. Is that behaviour is correct? From:

Re: [PERFORM] Performance of a large array access by position (tested version 9.1.3)

2012-06-26 Thread Pavel Stehule
2012/6/26 Marc Mamin m.ma...@intershop.de: On 22/06/12 09:02, Maxim Boguk wrote: May be I completely wrong but I always assumed that the access speed to the array element in PostgreSQL should be close to constant time. But in tests I found that access speed degrade as O(N) of array size.

Re: [PERFORM] Performance of a large array access by position (tested version 9.1.3)

2012-06-26 Thread Marc Mamin
-Original Message- From: Pavel Stehule [mailto:pavel.steh...@gmail.com] 2012/6/26 Marc Mamin m.ma...@intershop.de: On 22/06/12 09:02, Maxim Boguk wrote: May be I completely wrong but I always assumed that the access speed to the array element in PostgreSQL should be close

Re: [PERFORM] Performance of a large array access by position (tested version 9.1.3)

2012-06-26 Thread Pavel Stehule
2012/6/26 Marc Mamin m.ma...@intershop.de: -Original Message- From: Pavel Stehule [mailto:pavel.steh...@gmail.com] 2012/6/26 Marc Mamin m.ma...@intershop.de: On 22/06/12 09:02, Maxim Boguk wrote: May be I completely wrong but I always assumed that the access speed to the

Re: [PERFORM] Performance of a large array access by position (tested version 9.1.3)

2012-06-26 Thread Pavel Stehule
2012/6/26 Maxim Boguk maxim.bo...@gmail.com: On Tue, Jun 26, 2012 at 6:04 PM, Pavel Stehule pavel.steh...@gmail.com wrote: 2012/6/26 Marc Mamin m.ma...@intershop.de: On 22/06/12 09:02, Maxim Boguk wrote: May be I completely wrong but I always assumed that the access speed to the

[PERFORM] Performance of a large array access by position (tested version 9.1.3)

2012-06-25 Thread Maxim Boguk
Hi all, May be I completely wrong but I always assumed that the access speed to the array element in PostgreSQL should be close to constant time. But in tests I found that access speed degrade as O(N) of array size. Test case (performed on large not busy server with 1GB work_mem to ensure I

Re: [PERFORM] Performance of a large array access by position (tested version 9.1.3)

2012-06-25 Thread Jesper Krogh
On 22/06/12 09:02, Maxim Boguk wrote: Hi all, May be I completely wrong but I always assumed that the access speed to the array element in PostgreSQL should be close to constant time. But in tests I found that access speed degrade as O(N) of array size. Test case (performed on large not busy