Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B4871475C8C for ; Fri, 2 Aug 2002 12:30:27 -0400 (EDT) Received: from mail-relay.trade-india.com (mail-relay.trade-india.com [203.196.129.235]) by postgresql.org (Postfix) with SMTP id 4A3634758FE for ; Fri, 2 Aug 2002 12:30:24 -0400 (EDT) Received: (qmail 24298 invoked from network); 2 Aug 2002 16:19:58 -0000 Received: from system67.trade-india-local.com (192.168.0.67) by infocom-236-129-del.trade-india.com with SMTP; 2 Aug 2002 16:19:58 -0000 Content-Type: text/plain; charset="us-ascii" From: "Rajesh Kumar Mallah." Organization: Infocom Network Limited. To: pgsql-sql@postgresql.org Subject: Ltree usage.. Date: Fri, 2 Aug 2002 22:03:52 +0530 User-Agent: KMail/1.4.1 Cc: oleg@sai.msu.su MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200208022203.52617.mallah@trade-india.com> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/40 X-Sequence-Number: 8886 Hi Oleg, I am trying to use contrib/ltree for one of my applications. the query below works fine for me. Qry1: SELECT path from unified_data where path ~ '*.180.*' and path ~= '*.1.*'; is there any way of compacting it for example Qry2: SELECT path from unified_data where path ~ '*.180.*' or path ~ = '*.1.*'; is better written as=20 Qry3: SELECT path from unified_data where path ~ '*.180|1.*' ; also is qry3 better to Qry2 in terms of performance? regds mallah. --=20 Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)6152172 (221) (L) ,9811255597 (M) Visit http://www.trade-india.com , India's Leading B2B eMarketplace.