From: Michael Stone <mstone+postgres@mathom.us>
To: Axel Rau <Axel.Rau@Chaos1.DE>
Cc: pgsql-performance@postgresql.org
Subject: Re: directory tree query with big planner variation
Date: Mon, 31 Jul 2006 07:15:42 -0400
Message-ID: <20060731111540.GE2900@mathom.us> (raw)
In-Reply-To: <79BB9B3D-BCE5-46AA-82DF-BB6B1D0FE2A7@Chaos1.DE>
References: <79BB9B3D-BCE5-46AA-82DF-BB6B1D0FE2A7@Chaos1.DE>
On Mon, Jul 31, 2006 at 12:48:11PM +0200, Axel Rau wrote:
> WHERE P.path ~ '^%@/[^/]*/$' ) AS NLPC
This can't be indexed. You might try something like
WHERE P.path LIKE '%@%' AND P.path ~ '^%@/[^/]*/$'
The schema could be a lot more intelligent here. (E.g., store path
seperately from file/directory name, store type (file or directory)
seperately, etc.) Without improving the schema I don't think this will
ever be a speed demon.
Mike Stone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: mstone+postgres@mathom.us, Axel.Rau@Chaos1.DE
Subject: Re: directory tree query with big planner variation
In-Reply-To: <20060731111540.GE2900@mathom.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox