[GENERAL] Indexing question

2012-08-14 Thread amit sehas
In SQL, given a table T, with two fields f1, f2, is it possible to create an index such that the same record is indexed in the index, once with field f1 and once with field f2. (I am not looking for a compound index in which the key would look like , instead there should be two entries in the

[GENERAL] Behavior of subselects in target lists and order by

2012-02-24 Thread amit sehas
If we have a query of the form: Select *, (Select * FROM T2 WHERE p2 = T1.p1) FROM T1 ORDER BY 1 WHERE p3 = 75 In the above query there is a subselect in the target list and the ORDERBY has an ordinal number which indicates order by column 1. Does this mean that the above query will return all

Re: [GENERAL] indexes and tables

2011-12-18 Thread amit sehas
inheritance works in POstgres... any help is greatly appreciated... thanks --- On Sun, 12/18/11, David Johnston wrote: > From: David Johnston > Subject: RE: [GENERAL] indexes and tables > To: "'amit sehas'" , pgsql-general@postgresql.org > Date: Sunday, December 1

[GENERAL] indexes and tables

2011-12-18 Thread amit sehas
HI, we have a schema related question. We have 10 types of resource records. Each one of these resource records has 3 fields (attributes) (lets say f1, f2, f3)...these fields have similar meaning to the corresponding 3 fields in each resource record although they be named slightly differently in