Why index scan doesn't work ??? - Mailing list pgsql-general

From Tourtounis Sotiris
Subject Why index scan doesn't work ???
Date
Msg-id Pine.GSO.4.44.0208231335360.3717-100000@fryni.csd.uch.gr
Whole thread Raw
Responses Re: Why index scan doesn't work ???  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Hello i have a question baout the functionality of index.Specifically, i
have table let say A(att0 int4, att1 int4, att2 int4) and i construct 2
indexes, one on att0 and one in att2 respectively. Afterwards i make an
insertion of tuples to that table through the 'copy A from ' a batch
file and after i run the command of vacuum verbose and finally i make the
following  SQL query:

select Y.att0 from class X, class Y where ((X.att0 = %d) and (X.att1 <= Y.att0) and (Y.att0 <= X.att0))

Theoretically both indexes should run on both class X and class Y. However
only the index on class X runs whether there is an execution of a
sequential scan to class Y. Please if anyone has any opinion or can notice
any mistake/fault that i have done to all those that i prereffered
previoysly is welcome to testify it. Thanks a priori !!!

PS: The postmaster is running with the amount of 1000 buffers as the
amount of the inserted tuples is about 1/4 of million.


                                                 SWTHRHS TOYRTOYNHS
                                                (tourtoun@csd.uch.gr)



pgsql-general by date:

Previous
From: Richard Huxton
Date:
Subject: Re: trigger fired on changes in specific column
Next
From: Dennis Bjorklund
Date:
Subject: Re: trigger fired on changes in specific column