Skip site navigation (1) Skip section navigation (2)

Re: Bug #569: Strange Queries Behaviours

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: <catencio(at)grupozoom(dot)com>, <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Bug #569: Strange Queries Behaviours
Date: 2002-01-29 23:37:39
Message-ID: 20020129153517.H96224-100000@megazone23.bigpanda.com (view raw or flat)
Thread:
Lists: pgsql-bugs
On Tue, 29 Jan 2002 pgsql-bugs(at)postgresql(dot)org wrote:

> Carlos Atencio (catencio(at)grupozoom(dot)com) reports a bug with a severity of 2
>
>     I've this query that I run in my app. For example, give a list of
> all sales from all my stores around the country. The query runs very
> fast and I get the result I want. Later, I try to reduce the search
> and instead of list all stores, I want to list only one store. The
> query runs but this time is slower than before (I have the proper
> indexes in that table). In this case, we're using the same query but
> with one more condition.
>
>     I looked at the query with the explain command and I saw that
> Postgres wasn't using the sentence where I ask only for one store.
> Accidentally, I made a mistake and wrote the one store sentence twice
> in that query. My surprise was that the query did work!!!. When the
> query had the same sentence written twice it actually worked fine and
> it took fewer time than before.
>
>     None has known how to repair this. In some queries, duplicating
> some senteces makes it work. In other queries, it doesn't.

We're probably going to need more information.  At least schema, queries
and explain output will be useful.  You may also want to try your setup
on 7.1.3 and see if it runs better.



In response to

pgsql-bugs by date

Next:From: Mark JeacockeDate: 2002-01-30 22:54:17
Subject: PostgresSQL 7.1.3 not parsing SELECT portion of SQL correctly
Previous:From: pgsql-bugsDate: 2002-01-29 23:20:12
Subject: Bug #569: Strange Queries Behaviours

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group