Re: [GENERAL] ctid ranges

2012-06-13 Thread Tom Lane
Bruce Momjian writes: > On Wed, Jun 13, 2012 at 03:21:17PM -0500, Merlin Moncure wrote: >> IMNSHO, it's a no-brainer for the todo (but I think it's more >> complicated than adding some comparisons -- which are working now): > I see. Seems we have to add index smarts to those comparisons. That >

Re: [GENERAL] ctid ranges

2012-06-13 Thread Bruce Momjian
On Wed, Jun 13, 2012 at 03:21:17PM -0500, Merlin Moncure wrote: > On Wed, Jun 13, 2012 at 3:18 PM, Bruce Momjian wrote: > > On Wed, Jun 13, 2012 at 03:15:14PM -0500, Merlin Moncure wrote: > >> yeah -- and I think it's a great thing to want to be able to do.  it > >> could be used in parallelizing

Re: [GENERAL] ctid ranges

2012-06-13 Thread Merlin Moncure
On Wed, Jun 13, 2012 at 3:18 PM, Bruce Momjian wrote: > On Wed, Jun 13, 2012 at 03:15:14PM -0500, Merlin Moncure wrote: >> yeah -- and I think it's a great thing to want to be able to do.  it >> could be used in parallelizing tricks for example: divide up a table >> into N approximately equal part

Re: [GENERAL] ctid ranges

2012-06-13 Thread Bruce Momjian
On Wed, Jun 13, 2012 at 03:15:14PM -0500, Merlin Moncure wrote: > On Mon, Jun 11, 2012 at 7:57 PM, Jeff Davis wrote: > > On Fri, 2012-06-08 at 22:27 +0100, Thomas Munro wrote: > >> This is slow, handled with a seq scan (as are various rephrasing with > >> <, <=, etc): > >> > >> SELECT ... FROM ...

Re: [GENERAL] ctid ranges

2012-06-13 Thread Merlin Moncure
On Mon, Jun 11, 2012 at 7:57 PM, Jeff Davis wrote: > On Fri, 2012-06-08 at 22:27 +0100, Thomas Munro wrote: >> This is slow, handled with a seq scan (as are various rephrasing with >> <, <=, etc): >> >> SELECT ... FROM ... WHERE ctid BETWEEN ... AND ...; >> >> Is there a way to retrieve the rows i

Re: [GENERAL] ctid ranges

2012-06-11 Thread Jeff Davis
On Fri, 2012-06-08 at 22:27 +0100, Thomas Munro wrote: > This is slow, handled with a seq scan (as are various rephrasing with > <, <=, etc): > > SELECT ... FROM ... WHERE ctid BETWEEN ... AND ...; > > Is there a way to retrieve the rows in a physical range quickly? Interesting idea. However, as

[GENERAL] ctid ranges

2012-06-08 Thread Thomas Munro
Hi In 9.1.3, this is fast, handled with a tid scan using the physical address: SELECT ... FROM ... WHERE ctid = ...; This is slow, handled with a seq scan (as are various rephrasing with <, <=, etc): SELECT ... FROM ... WHERE ctid BETWEEN ... AND ...; Is there a way to retrieve the rows in a p