From: Remigiusz Sokolowski <rems@gdansk.sprint.pl>
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] Character type name?? How to lower case it? (fwd)
Date: Mon, 1 Feb 1999 08:40:03 +0100 (MET)
Message-ID: <Pine.GS4.4.02A.9902010838150.6052-100000@netra.gdansk.sprint.pl> (raw)
>
> Moin! (* ignore, it's a german greeting phrase *)
>
> Hi!
>
> On Fri, 29 Jan 1999 14:51:29 +0100 (MET)
> Remigiusz Sokolowski <rems@gdansk.sprint.pl> wrote:
> [snipped]
> > Right, but I suppose, that var1 and var2 and var3 are only examples - it
> > could be that it would be 'chicks', 'flames' and 'tails' - what about
> > this? :-)
>
> You're right.
> But I wouldn't make it into different OR clauses. If the select joins
> tables, I guess the ORs will decrease the performance due to multiple
> evaluations of the join.
>
> This could be circumvented by putting the patterns in the regex.
>
> Example:
> where (relname ~* 'pg_class') OR (relname ~* 'pg_attribute')
> will be converted to:
> where relname ~* 'pg_class|pg_attribute'
>
> So, only one regex-match ist performed and no difficulties with
> multiple OR clauses will arise.
>
> Comments?
>
This, what I here write is only my supposition. I'm not aware of how
Postgres optimizes its queries, but I have some expierience with oyher
databases - AFAIK usually optimizer makes optimization for simple
construction of queries - for example with OR or AND clauses - in cases
much more complicated structures it could be just slower.
I want here only present my point of view - in this case I could be wrong,
cause have not too much time used postgres...
Rem
p.s.
may be somebody more expierienced give me a hint, where to find something
about optimization of queries in Postgres?
-------------------------------------------------------------------*------------
Remigiusz Sokolowski e-mail: rems@gdansk.sprint.pl * *
-----------------------------------------------------------------*****----------
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: rems@gdansk.sprint.pl
Subject: Re: [SQL] Character type name?? How to lower case it? (fwd)
In-Reply-To: <Pine.GS4.4.02A.9902010838150.6052-100000@netra.gdansk.sprint.pl>
References: <Pine.GS4.4.02A.9902010838150.6052-100000@netra.gdansk.sprint.pl>
* 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