Re: Antw: Re: Query questions - Mailing list pgsql-general

From Richard Huxton
Subject Re: Antw: Re: Query questions
Date
Msg-id 44CE19EB.3010303@archonet.com
Whole thread Raw
In response to Antw: Re: Query questions  ("Christian Rengstl" <Christian.Rengstl@klinik.uni-regensburg.de>)
Responses Re: Antw: Re: Query questions  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-general
Christian Rengstl wrote:
> My version is 8.1.4. Here is the plan for the query, it's performed on a
> smaller table, though because i can't access the biggest table at the
> moment:
> QUERY PLAN
>
>
-----------------------------------------------------------------------------------------------------------------------------
>
> Bitmap Heap Scan on mytable  (cost=67.48..16738.24 rows=6519 width=10)
> (actual time=34.033..1903.106 rows=1 loops=1)
>   Recheck Cond: ((pid)::text = 'ZZZ000110011'::text)
>
>   Filter: ((crit)::text = '915677'::text)
>
>   ->  Bitmap Index Scan on idx_pid_22  (cost=0.00..67.48 rows=8996
> width=0) (actual time=12.998..12.998 rows=6207 loops=1)
>         Index Cond: ((pid)::text = 'ZZZ000110011'::text)
>
> Total runtime: 1903.894 ms
>
> And yes i have indexes on both pid (varchar(15)) and crit(varchar(13)).

That's not quite what Andreas asked. Do you have an index on (pid, crit)?

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Practical maximums (was Re: PostgreSQL theoretical
Next
From: DANTE Alexandra
Date:
Subject: Re: Questions about update, delete, ctid...