"Henrik Zagerholm" <henke@mac.se> writes:
> Hi list,
>
> I'm having a weird acting query which simply retrieves some files stored in a db
> which are related to a specific archive and also has a size lower than 1024
> bytes.
> Explain analyze below. The first one is with seq-scan enabled and the other one
> with seq-scans disabled. The weird thing is the seq scan on tbl_file_structure
> and also the insane calculated cost of 100 000 000 on some tables.
Well the way Postgres disables a plan node type is by giving it a cost of
100,000,000. What other way did you expect it to be able to scan
tbl_filetype_suffix anyways? What indexes do you have on tbl_filetype_suffix?
And any chance you could resend this stuff without the word-wrapping?
It's pretty hard to read like this:
" -> Seq Scan on tbl_filetype_suffix
(cost=100000000.00..100000001.34 rows=14 width=8) (actual time=0.133..0.176
rows=14 loops=1)"
" Filter: (filetype_suffix_index IS
TRUE)"
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com