From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Alain Lavigne <alavigne@zaq.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Need help on a troublesome query plan
Date: Tue, 16 Jul 2002 11:52:05 -0700 (PDT)
Message-ID: <20020716115118.L51289-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <C34466F5BBA39949A8F5C180022EC2064846DB@zaq-msg-03.corp.zaq.com>
On Tue, 16 Jul 2002, Alain Lavigne wrote:
> Index "bld_x1_tb_bus_fact"
> Column | Type
> -----------------+---------------
> party_id | bigint
> bus_fact_typ_cd | character(10)
> cont_id | bigint
> btree
>
> With the following query on 50000 records:
>
> explain
> SELECT bld_TB_BUS_FACT.BUS_FACT_ID AS id
> FROM bld_TB_BUS_FACT
> WHERE bld_TB_BUS_FACT.PARTY_ID=1320677
> AND bld_TB_BUS_FACT.BUS_FACT_TYP_CD='MSG_SENT'
> AND bld_TB_BUS_FACT.CONT_ID=786448
> AND bld_TB_BUS_FACT.BUS_FACT_KYWRD ILIKE '%MT-ID=3407979%'
> AND bld_TB_BUS_FACT.BUS_FACT_KYWRD ILIKE '%S-ID=1310723%'
> limit 1;
You'll need to either single quote or explicitly cast the
constants you're comparing to the bigint columns.
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-sql@postgresql.org
Cc: sszabo@megazone23.bigpanda.com, alavigne@zaq.com
Subject: Re: Need help on a troublesome query plan
In-Reply-To: <20020716115118.L51289-100000@megazone23.bigpanda.com>
* 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