Re: Composite Index Structure - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Composite Index Structure
Date
Msg-id 4D74A5EA.7090204@enterprisedb.com
Whole thread Raw
In response to Re: Composite Index Structure  (Nick Raj <nickrajjain@gmail.com>)
List pgsql-hackers
On 07.03.2011 11:11, Nick Raj wrote:
> create index ..... using gist (coordinates,time). It will create index on
> both but i think there would be no linkage between them.
> But i want linkage between location and time tree. I want for each location
> i have Btree like
>
>                                                          Rtree root
>                                                              /     \
>                                                       non-leaf .......
>                                                        /    \          \
>                                                   leaf   ......       leaf
>                                                     |                     |
>                                               Btree root        Btree root
>                                                /         \          /       \
>                                          non-leaf
>                                            /
>                                       leaf
>
> How to create this kind of structure?

A multi-column index is quite similar to that, you should get the same 
performance characteristics. The leading column will determine the 
primary order of the tree, and for rows that have the same value in the 
leading column, the second column will determine the order among them.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [COMMITTERS] pgsql: Efficient transaction-controlled synchronous replication.
Next
From: Fujii Masao
Date:
Subject: Re: [COMMITTERS] pgsql: Efficient transaction-controlled synchronous replication.