Re: [PERFORM] Creating indexes

2008-05-08 Thread Rauan Maemirov
On May 9, 1:49 am, [EMAIL PROTECTED] (Asche) wrote: > Hi, > > > Hi, all. I want to ask what type of index is better to create for > > bigint types. I have table with bigint (bigserial) primary key. What > > http://www.postgresql.org/docs/8.3/static/sql-createtable.html > > PostgreSQL automatically

Re: [PERFORM] Creating indexes

2008-05-08 Thread Asche
Hi, Hi, all. I want to ask what type of index is better to create for bigint types. I have table with bigint (bigserial) primary key. What http://www.postgresql.org/docs/8.3/static/sql-createtable.html PostgreSQL automatically creates an index for each unique constraint and primary key cons

Re: [PERFORM] Creating indexes

2008-05-08 Thread PFC
Hi, all. I want to ask what type of index is better to create for bigint types. I have table with bigint (bigserial) primary key. What type is better to use for it? I tried btree and hash, but didn't notice any differences in execution time. For GiST and GIN there is a trouble that I must create o

Re: [PERFORM] Creating a foreign key

2008-05-08 Thread PFC
When you create a foreign key to a table is there an index that is created on the foreign key automatically? No, Postgres doesn't do it for you, because if you create (ref_id) references table.id, you will perhaps create an index on (ref_id, date) which would then fill the purpose (and ot

Re: [PERFORM] Creating indexes

2008-05-08 Thread Alan Hodgson
On Thursday 08 May 2008, Rauan Maemirov <[EMAIL PROTECTED]> wrote: > Hi, all. I want to ask what type of index is better to create for > bigint types. I have table with bigint (bigserial) primary key. What > type is better to use for it? I tried btree and hash, but didn't > notice any differences i

[PERFORM] Creating indexes

2008-05-08 Thread Rauan Maemirov
Hi, all. I want to ask what type of index is better to create for bigint types. I have table with bigint (bigserial) primary key. What type is better to use for it? I tried btree and hash, but didn't notice any differences in execution time. For GiST and GIN there is a trouble that I must create op

Re: [PERFORM] Creating a foreign key

2008-05-08 Thread Campbell, Lance
Shaun, Thanks for the very detailed description of why posgres does not auto create indexes. That makes a lot of sense. Thanks again, Lance Campbell Project Manager/Software Architect Web Services at Public Affairs University of Illinois 217.333.0382 http://webservices.uiuc.edu -Original M

Re: [PERFORM] Creating a foreign key

2008-05-08 Thread Shaun Thomas
On Thu, 2008-05-08 at 17:52 +0100, Campbell, Lance wrote: > Is there an index automatically created on field fk_a_id in table B > when I create a foreign key constraint? No. The problem with doing this is it assumes certain things about your infrastructure that may be entirely false. Indexes a

Re: [PERFORM] Creating a foreign key

2008-05-08 Thread Joshua D. Drake
On Thu, 8 May 2008 11:52:50 -0500 "Campbell, Lance" <[EMAIL PROTECTED]> wrote: > PostgreSQL: 8.2 > > > > When you create a foreign key to a table is there an index that is > created on the foreign key automatically? No. Joshua D. Drake -- The PostgreSQL Company since 1997: http://www.comm

[PERFORM] Creating a foreign key

2008-05-08 Thread Campbell, Lance
PostgreSQL: 8.2 When you create a foreign key to a table is there an index that is created on the foreign key automatically? Example: Table A has a field called ID. Table B has a field called fk_a_id which has a constraint of being a foreign key to table A to field ID. Is there an

Re: [PERFORM] [GENERAL] Ubuntu question

2008-05-08 Thread Justin
sorry all i accident cross posted fat fingered it Justin wrote: Q Master wrote: Hello, I had postgresql 7.4 on ubuntu and over one year ago I moved to 8.2 Till now I was backing up my db via pgadmin remotely from windows but now I want to do it from the ubuntu server. When I run the comma

Re: [PERFORM] [GENERAL] Ubuntu question

2008-05-08 Thread Justin
Q Master wrote: Hello, I had postgresql 7.4 on ubuntu and over one year ago I moved to 8.2 Till now I was backing up my db via pgadmin remotely from windows but now I want to do it from the ubuntu server. When I run the command pgdump it said that the database is 8.2 but the tool is 7.4 -