Re: directory tree query with big planner variation

From: Michael Stone <mstone+postgres(at)mathom(dot)us>
To: Axel Rau <Axel(dot)Rau(at)Chaos1(dot)DE>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: directory tree query with big planner variation
Date: 2006-07-31 11:15:42
Message-ID: 20060731111540.GE2900@mathom.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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 '%(at)%' 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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Axel Rau 2006-07-31 11:54:24 Re: directory tree query with big planner variation
Previous Message Axel Rau 2006-07-31 10:48:11 directory tree query with big planner variation