On Fri, Mar 23, 2007 at 02:13:57PM +0100, Henrik Zagerholm wrote:
> I'm just amazed that setting the statistics threshold on one column
> mad all the difference. IS there any guidelines on what columns I
> should change the statistics on?
Start by looking for columns involved in simple compari
Never mind my last post regarding the Bitmap heap scan. That is all
in order.
Now it works perfectly. Went from 30+ seconds to 179ms. =)
I'm just amazed that setting the statistics threshold on one column
mad all the difference. IS there any guidelines on what columns I
should change the s
23 mar 2007 kl. 13:34 skrev Michael Fuhr:
On Fri, Mar 23, 2007 at 12:41:58PM +0100, Henrik Zagerholm wrote:
23 mar 2007 kl. 12:33 skrev Michael Fuhr:
The row count estimate for fk_filetype_id = 83 is high by an order
of magnitude:
Bitmap Index Scan on tbl_file_idx6 (cost=0.00..25.65 rows=1
Henrik Zagerholm wrote:
>> Have you run ANALYZE or VACUUM ANALYZE on these tables recently?
>> If so then you might try increasing the statistics target for
>> tbl_file.fk_filetype_id and perhaps some of the columns in the join
>> conditions.
>
> I did a vacuum full and reindex on all tables.
>
>
On Fri, Mar 23, 2007 at 12:41:58PM +0100, Henrik Zagerholm wrote:
> 23 mar 2007 kl. 12:33 skrev Michael Fuhr:
> >The row count estimate for fk_filetype_id = 83 is high by an order
> >of magnitude:
> >
> >>Bitmap Index Scan on tbl_file_idx6 (cost=0.00..25.65 rows=1251
> >>width=0) (actual time=21.9
23 mar 2007 kl. 12:33 skrev Michael Fuhr:
On Fri, Mar 23, 2007 at 11:43:54AM +0100, Henrik Zagerholm wrote:
I'm having a hard time understanding why my query is not using my
indices when I change a field in the WHERE clause.
The row count estimate for fk_filetype_id = 83 is high by an order
On Fri, Mar 23, 2007 at 11:43:54AM +0100, Henrik Zagerholm wrote:
> I'm having a hard time understanding why my query is not using my
> indices when I change a field in the WHERE clause.
The row count estimate for fk_filetype_id = 83 is high by an order
of magnitude:
> Bitmap Index Scan on tbl_
Hello list,
I'm having a hard time understanding why my query is not using my
indices when I change a field in the WHERE clause.
Please could someone shed some light on this.
Below is both queries and explain analyze for the different queries.
Regards,
Henrik
QUERY 1. Using WHERE tbl_file_s