Re: [SQL] A question about indexes...

2000-08-06 Thread Tom Lane
Alexaki Sofia <[EMAIL PROTECTED]> writes: > But as I see from the query plan the indexes are not used, instead > sequential search is done either I define indexes or not. > As you can see below the query plan remains the same. > Is that reasonable??? Shouldn't Postgresql use the indexes in order

Re: [SQL] A question about indexes...

2000-08-04 Thread Alexaki Sofia
Hello, I have the following tables in my database Painter(id integer, uri varchar(256)) paints(id1 integer, id2 integer) in order to speed up the join (select * from painter, paints where painter.id= paints.id1) between these two tables I have created indexes on the field painter.id and/or pa

Re: [SQL] A question about indexes...

2000-08-03 Thread Tom Lane
Alexaki Sofia <[EMAIL PROTECTED]> writes: > I can either define the field id as a Primary Key or create an Btree index > on it. What is more effient?? > From my test I see that creating Btree index is a bit faster!!. I think you're seeing things. Declaring a field primary key creates a btre

[SQL] A question about indexes...

2000-08-03 Thread Alexaki Sofia
Hello, I have the following tables in my db Painter (id integer, uri varchar(256)) and paints (id1 integer, id2 integer) I want to optimize the question select id from Painter where uri = 'x'; What kind of index (Btree or Hash) is more efficient to create on field uri since it'