Re: Performance woes relating to DISTINCT (I think)

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: boinger <boinger(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Performance woes relating to DISTINCT (I think)
Date: 2005-09-29 20:49:00
Message-ID: 20050929204900.GM30974@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Sep 27, 2005 at 09:07:41AM -0500, boinger wrote:
> -> Index Scan using strafe_group on tasks_applied
> (cost=0.00..6.02 rows=1 width=22) (actual time=0.042..0.043 rows=0
> loops=1188)
>
> Index Cond: ((("outer".modcode)::text =
> (tasks_applied.modcode)::text) AND (tasks_applied.yearcode =
> "outer".yearcode) AND (tasks_applied.seid = 500001))
>
> Filter: (cid = 0)
>
> Total runtime: 80.764 ms

Compare that to the index scan it had to do before. Now that you gave
the database the exact info it needs to answer your real question, it
can use a much, much more selective index scan.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim C. Nasby 2005-09-29 20:50:38 Re: [SQL] add column if doesn't exist (fwd)
Previous Message Vivek Khera 2005-09-29 20:45:16 Re: DBI/DBD::Pg mem. use goes exponential