Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Gregory Stark
"Josh Harrison" <[EMAIL PROTECTED]> writes: > Aggregate (cost=342178.51..342178.52 rows=1 width=0) >-> Bitmap Heap Scan on person (cost=3120.72..341806.71 rows=148721 > width=0) > Recheck Cond: (person_id > 114600::numeric) > -> Bitmap Index Scan on person_pk (cost

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Andrew Sullivan
On Wed, Jan 09, 2008 at 12:24:37PM -0500, Josh Harrison wrote: > For example if I have a query like > select column2 from ABC where column1 > 20 > and table ABC is indexed on (column1,column2) then Oracle will not goto the > heap to fetch the tuples. It will return them from the index itself since

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 12:11 PM, Andrew Sullivan <[EMAIL PROTECTED]> wrote: > On Wed, Jan 09, 2008 at 11:51:16AM -0500, Josh Harrison wrote: > > > accessed frequently. So clustering the table according to one index will > > yield poor performance to queries involving other indexes. > > Maybe not poor, but

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 11:56 AM, Andreas Kretschmer <[EMAIL PROTECTED]> wrote: > Josh Harrison <[EMAIL PROTECTED]> schrieb: > > My questions > > 1. I pg_dumped dummy and Shuffled_dummy (from database1) to another > database > > (database2) > > When I issued the query in both database (database1 and datab

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Andrew Sullivan
On Wed, Jan 09, 2008 at 11:51:16AM -0500, Josh Harrison wrote: > accessed frequently. So clustering the table according to one index will > yield poor performance to queries involving other indexes. Maybe not poor, but certainly not optimised. > Index-only scan is a good solution for this I gue

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Andreas Kretschmer
Josh Harrison <[EMAIL PROTECTED]> schrieb: > My questions > 1. I pg_dumped dummy and Shuffled_dummy (from database1) to another database > (database2) > When I issued the query in both database (database1 and database2) > > select * from dummy limit 1000 ( the planner chooses seq scan for this qu

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 11:39 AM, Andrew Sullivan <[EMAIL PROTECTED]> wrote: > On Wed, Jan 09, 2008 at 05:28:15PM +0100, Ivan Sergio Borgonovo wrote: > > Does it make any sense *knowing* how the implementation works to load > > records in a table in a specific order to improve performances? > > Well, this

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 11:28 AM, Ivan Sergio Borgonovo <[EMAIL PROTECTED]> wrote: > On Wed, 09 Jan 2008 10:54:21 -0500 > Tom Lane <[EMAIL PROTECTED]> wrote: > > > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > > Josh Harrison escribió: > > >> Fine. I can use order by when I want to order it in terms of >

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Andrew Sullivan
On Wed, Jan 09, 2008 at 05:28:15PM +0100, Ivan Sergio Borgonovo wrote: > Does it make any sense *knowing* how the implementation works to load > records in a table in a specific order to improve performances? Well, this is more or less what CLUSTER does. There are some cases where happening to kn

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Ivan Sergio Borgonovo
On Wed, 09 Jan 2008 10:54:21 -0500 Tom Lane <[EMAIL PROTECTED]> wrote: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > Josh Harrison escribió: > >> Fine. I can use order by when I want to order it in terms of > >> some columns. But What if I want to maintain the same order as > >> in the databas

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 10:27 AM, Alvaro Herrera <[EMAIL PROTECTED]> wrote: > Josh Harrison escribió: > > > Another quick question...When you issue a query like this > > select * from dummy limit 10 > > What 10 rows are fetched? like first 10 or last 10 or the first 10 > from > > first block or ? > >

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Josh Harrison escribió: >> Fine. I can use order by when I want to order it in terms of some columns. >> But What if I want to maintain the same order as in the database1? ie., I >> want my rows of TableABC in Database2 to be the same order as the rows

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Alvaro Herrera
Josh Harrison escribió: > Another quick question...When you issue a query like this > select * from dummy limit 10 > What 10 rows are fetched? like first 10 or last 10 or the first 10 from > first block or ? Any 10. (First 10 in the physical table _if_ a seqscan is used). > And this query

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 9:59 AM, A. Kretschmer <[EMAIL PROTECTED]> wrote: > am Wed, dem 09.01.2008, um 9:45:11 -0500 mailte Josh Harrison folgendes: > > What if I want to maintain the same order as in the database1? ie., I > want my > > rows of TableABC in Database2 to be the same order as the rows in >

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread A. Kretschmer
am Wed, dem 09.01.2008, um 9:45:11 -0500 mailte Josh Harrison folgendes: > What if I want to maintain the same order as in the database1? ie., I want my > rows of TableABC in Database2 to be the same order as the rows in TableABC in > Database 1 ??? For what reason? Again: there is no order wit

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 9:35 AM, A. Kretschmer <[EMAIL PROTECTED]> wrote: > am Wed, dem 09.01.2008, um 14:07:13 + mailte Raymond O'Donnell > folgendes: > > On 09/01/2008 14:02, Josh Harrison wrote: > > > > >When restoring the pg_dumped data thro psql does the rows of the table > > >are restored in the

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Alvaro Herrera
Josh Harrison escribió: > Fine. I can use order by when I want to order it in terms of some columns. > But What if I want to maintain the same order as in the database1? ie., I > want my rows of TableABC in Database2 to be the same order as the rows in > TableABC in Database 1 ??? You can't. --

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
On Jan 9, 2008 9:12 AM, A. Kretschmer <[EMAIL PROTECTED]> wrote: > am Wed, dem 09.01.2008, um 9:02:23 -0500 mailte Josh Harrison folgendes: > > Hi, > > When restoring the pg_dumped data thro psql does the rows of the table > are > > restored in the same order? ie for example if > > Table A has r

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread A. Kretschmer
am Wed, dem 09.01.2008, um 14:07:13 + mailte Raymond O'Donnell folgendes: > On 09/01/2008 14:02, Josh Harrison wrote: > > >When restoring the pg_dumped data thro psql does the rows of the table > >are restored in the same order? ie for example if > >Table A has rows r1,r2,r3,r4,r5 in this or

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread A. Kretschmer
am Wed, dem 09.01.2008, um 9:02:23 -0500 mailte Josh Harrison folgendes: > Hi, > When restoring the pg_dumped data thro psql does the rows of the table are > restored in the same order? ie for example if > Table A has rows r1,r2,r3,r4,r5 in this order, then if I pg_dump and restore > it > to ano

Re: [GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Raymond O'Donnell
On 09/01/2008 14:02, Josh Harrison wrote: When restoring the pg_dumped data thro psql does the rows of the table are restored in the same order? ie for example if Table A has rows r1,r2,r3,r4,r5 in this order, then if I pg_dump and restore it to another database, will it have the rows in the sa

[GENERAL] quick question abt pg_dump and restore

2008-01-09 Thread Josh Harrison
Hi, When restoring the pg_dumped data thro psql does the rows of the table are restored in the same order? ie for example if Table A has rows r1,r2,r3,r4,r5 in this order, then if I pg_dump and restore it to another database, will it have the rows in the same order r1,r2,r3,r4,r5? Does this apply t