Re: Performance

From: Shane Ambler <pgsql(at)007Marketing(dot)com>
To: PostgreSQL Mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: Performance
Date: 2006-04-23 05:17:35
Message-ID: C0714407.3F9E5%pgsql@007Marketing.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

My first thought would be to consider changing the municipio column to an
int and listing the full names in another table.

In this scenario would you be able to search something like
where municipio>1 and municipio <20

If not you may still get improvements from an int search instead of a string
search.

On 23/4/2006 10:23, "Richard Broersma Jr" <rabroersma(at)yahoo(dot)com> wrote:

> I expect that you will need to post and explain analyze results of this query
> so that members of
> the list can give you better feedback.
>
> --- Bert <clemens(dot)bertschler(at)gmail(dot)com> wrote:
>
>> Hi List
>> I have maybe an easy question but i do not find an answer, i have this
>> SQL query:
>>
>> SELECT geom,group,production_facs FROM south_america
>> WHERE municipio = ''
>> OR municipio = 'ACRE'
>> OR municipio = 'ADJUNTAS'
>> OR municipio = 'AGUADA'
>>
>> The performance of this query is quite worse as longer it gets, its
>> possible that this query gets over 20 to 30 OR comparisons, but then
>> the performance is really worse, is it possible to speed it up?
>> Thanks
>> Clemens
>>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 2: Don't 'kill -9' the postmaster
>>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gregory S. Williamson 2006-04-23 10:00:52 Re: Performance
Previous Message Bruce Momjian 2006-04-23 04:01:51 Re: [GENERAL] Transaction eating up all RAM