searching using indexes 8.3

Started by LARC/J.L.Shipman/jshipmanabout 18 years ago4 messagesgeneral
Jump to latest
#1LARC/J.L.Shipman/jshipman
Jeffery.L.Shipman@nasa.gov

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?

757-864-7114
LARC/J.L.Shipman/jshipman
Jeffery.L.Shipman@nasa.gov

#2Richard Huxton
dev@archonet.com
In reply to: LARC/J.L.Shipman/jshipman (#1)
Re: searching using indexes 8.3

LARC/J.L.Shipman/jshipman wrote:

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?

An index to fetch all the rows from a table? How would that help?

--
Richard Huxton
Archonet Ltd

#3Alan Hodgson
ahodgson@simkin.ca
In reply to: LARC/J.L.Shipman/jshipman (#1)
Re: searching using indexes 8.3

On Monday 10 March 2008, LARC/J.L.Shipman/jshipman
<jeffery.l.shipman@nasa.gov> 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?

You asked for the whole table. How would an index help?

--
Alan

#4Alban Hertroys
dalroi@solfertje.student.utwente.nl
In reply to: LARC/J.L.Shipman/jshipman (#1)
Re: searching using indexes 8.3

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!