Re: [GENERAL] why does explain tell me I'm using a seq scan?

2003-11-10 Thread Mark Harrison
Adam Ruth wrote: The optimizer is looking at the statistics and figuring that the second query could be done better with a sequential scan (perhaps there aren't many rows). Have you analyzed the table to get the statistics up to date? It could also be that the seq scan is faster with the

[GENERAL] why does explain tell me I'm using a seq scan?

2003-11-07 Thread Mark Harrison
I have indexed two columns in a table. Can somebody explain to me why the first query below uses an Index Scan while the second uses a Seq Scan? Many TIA! Mark planb=# \d abcs Table public.abcs Column | Type | Modifiers

Re: [GENERAL] why does explain tell me I'm using a seq scan?

2003-11-07 Thread Rod Taylor
On Fri, 2003-11-07 at 19:11, Mark Harrison wrote: I have indexed two columns in a table. Can somebody explain to me why the first query below uses an Index Scan while the second uses a Seq Scan? The first expects to find a single row, the second expects to find 17000 rows, a significant