From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Frank Schoep <frank(at)ffnn(dot)nl> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: Bad planner decision - bitmap scan instead of index |
Date: | 2007-08-16 17:01:24 |
Message-ID: | 6237.1187283684@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Frank Schoep <frank(at)ffnn(dot)nl> writes:
> Limit (cost=4002.04..4002.29 rows=100 width=48) (actual
> time=1469.565..1470.097 rows=100 loops=1)
> -> Sort (cost=3997.29..4031.18 rows=13556 width=48) (actual
> time=1460.958..1467.993 rows=2000 loops=1)
> Sort Key: name
> -> Bitmap Heap Scan on movies (cost=86.45..3066.90
> rows=13556 width=48) (actual time=20.522..77.889 rows=13640 loops=1)
> Recheck Cond: (letter = 'T'::bpchar)
> -> Bitmap Index Scan on movies_letter
> (cost=0.00..86.45 rows=13556 width=0) (actual time=18.452..18.452
> rows=13658 loops=1)
> Index Cond: (letter = 'T'::bpchar)
> Total runtime: 1474.821 ms
Why is the sort step so slow? Sorting a mere 13k rows shouldn't take
very long. Maybe you are overrunning work_mem and it's falling back
to a disk sort ... what is work_mem set to?
Another theory is that you are using a locale in which strcoll() is
horridly expensive :-(
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | tyrrill_ed | 2007-08-16 17:30:11 | Re: Integrated perc 5/i |
Previous Message | Steinar H. Gunderson | 2007-08-16 16:43:47 | Re: Integrated perc 5/i |