Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2CBAD6340C7 for ; Tue, 12 May 2009 05:42:57 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 25261-01-2 for ; Tue, 12 May 2009 05:42:51 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.168]) by mail.postgresql.org (Postfix) with ESMTP id 87A0C6339F4 for ; Tue, 12 May 2009 05:42:23 -0300 (ADT) Received: by wf-out-1314.google.com with SMTP id 28so2491302wfc.28 for ; Tue, 12 May 2009 01:42:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=WLBZkDSQJZ4ZCYJYHWiSynQ5rXHOmFuhBfLAd11FxwM=; b=g+QaJkXqG2pX1J2wlGRajDkNAVwsclxt5AwvvSAmxsC2GBrAAfsz+dbtyrz5QBx/2M bsKFRIOybGEAwnZ6iwV7d2YRUiMS5TDSrn5466ib5zG8JBuSnfI7mXGhOx35yliyQ1sh u0PBGbk/rk7HSGpv8GlzfWEQUVxOutrmqESOI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=uvaPNCoKg38MkbqSPiKfZ4TR+rbVXOIPzHX+6y8k6Lc883cuZZptopQzGg3WVnWrO3 71Zg3vcwowvqAd/DBCN5PH66pfJ/KwWncjWqThD3m6TZTQuuKqQGL9dqUQiSGWcXrDrE xUJvHYkhehJ2s3kktsV/hIEYBQwA6JqOnMVDY= MIME-Version: 1.0 Received: by 10.142.213.5 with SMTP id l5mr1111803wfg.49.1242117742391; Tue, 12 May 2009 01:42:22 -0700 (PDT) In-Reply-To: <200905121138.33188.achill@matrix.gatewaynet.com> References: <7c33d060905120105y74b0483eyf5d94c07912a0702@mail.gmail.com> <200905121138.33188.achill@matrix.gatewaynet.com> Date: Tue, 12 May 2009 15:42:22 +0700 Message-ID: <7c33d060905120142t75d1c887jfe62f21361eac178@mail.gmail.com> Subject: Re: Array: comparing first N elements? From: David Garamond To: Achilleas Mantzios Cc: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=000e0cd50a6ccdf34d0469b31287 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200905/55 X-Sequence-Number: 32547 --000e0cd50a6ccdf34d0469b31287 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 2009/5/12 Achilleas Mantzios > you would want to look at the intarray contrib package for index suppor and > many other goodies, > also you might want to write fucntions first(parents), last(parents) and > then have an index > on those as well. > This way searching for the direct children of a node is very fast. Thanks for the suggestions! Index support is exactly what I'm looking for. Will look into intarray. Regards, dave --000e0cd50a6ccdf34d0469b31287 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
2009/5/12 Achilleas Mantzios <achill@matrix.gatewaynet.com>
you would want to look at the intarray contrib package for index suppor and= many other goodies,
also you might want to write fucntions first(parents), last(parents) and th= en have an index
on those as well.
This way searching for the direct children of a node is very fast.

Thanks for the suggestions! Index support is exactl= y what I'm looking for. Will look into intarray.

Regards,
dave=A0
--000e0cd50a6ccdf34d0469b31287--