From: | Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl> |
---|---|
To: | LARC/J(dot)L(dot)Shipman/jshipman <jeffery(dot)l(dot)shipman(at)nasa(dot)gov> |
Cc: | PostgreSQL <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: searching using indexes 8.3 |
Date: | 2008-03-10 17:58:23 |
Message-ID: | 43D2ACBC-6215-43B4-8831-9C3FBA17C6C4@solfertje.student.utwente.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mar 10, 2008, at 6:33 PM, LARC/J.L.Shipman/jshipman wrote:
> Hi,
> When I do a search such as:
>
> EXPLAIN ANALYZE SELECT * FROM itemsbyauthor;
> QUERY PLAN
> ----------------------------------------------------------------------
> ---------------------------------------------
> Seq Scan on itemsbyauthor (cost=0.00..971.34 rows=53634 width=34)
> (actual time=0.029..25.831 rows=53634 loops=1)
> Total runtime: 34.851 ms
> (2 rows)
>
>
> I have an index for the table, but it is not being utilized. Why
> is this? How do I get the index to be used?
To fetch all rows unordered from a table the fastest method is a
sequential scan. An index scan would be slower, probably significantly.
Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.
!DSPAM:737,47d5748b233097069826464!
From | Date | Subject | |
---|---|---|---|
Next Message | Justin | 2008-03-10 18:03:54 | Re: how do you write aggregate function |
Previous Message | Dimitri Fontaine | 2008-03-10 17:57:38 | Re: [PERFORM] multi-threaded pgloader makes it in version 2.3.0 |