On Mon, Apr 6, 2009 at 8:50 AM, Mario Splivalo
wrote:
> Scott Marlowe wrote:
>>>
>>> CREATE INDEX photo_info_data_ix_field_value
>>> ON user_info_data USING btree (field_value);
>>>
>>> So, there is index on (user_id, field_name). Postgres is using index for
>>> user_id (...WHERE user_id = 12345)
Scott Marlowe wrote:
CREATE INDEX photo_info_data_ix_field_value
ON user_info_data USING btree (field_value);
So, there is index on (user_id, field_name). Postgres is using index for
user_id (...WHERE user_id = 12345) but not on field-name (...WHERE
field_name = 'f-spot'). When I add extra inde
On Mon, Apr 6, 2009 at 8:37 AM, Mario Splivalo
wrote:
> Scott Marlowe wrote:
>>
>> On Mon, Apr 6, 2009 at 6:20 AM, Mario Splivalo
>> wrote:
>>>
>>> Scott Marlowe wrote:
It's not really solved, it's just a happy coincidence that the current
plan runs well. In order to keep the quer
Scott Marlowe wrote:
On Mon, Apr 6, 2009 at 6:20 AM, Mario Splivalo
wrote:
Scott Marlowe wrote:
It's not really solved, it's just a happy coincidence that the current
plan runs well. In order to keep the query planner making good
choices you need to increase stats target for the field in the
On Mon, Apr 6, 2009 at 6:20 AM, Mario Splivalo
wrote:
> Scott Marlowe wrote:
>>
>> It's not really solved, it's just a happy coincidence that the current
>> plan runs well. In order to keep the query planner making good
>> choices you need to increase stats target for the field in the index
>> ab
Scott Marlowe wrote:
It's not really solved, it's just a happy coincidence that the current
plan runs well. In order to keep the query planner making good
choices you need to increase stats target for the field in the index
above. The easiest way to do so is to do this:
alter database mydb se
On Mon, Mar 30, 2009 at 9:34 AM, Mario Splivalo
wrote:
> -> Bitmap Heap Scan on photo_info_data u (cost=2193.50..26798.74
> rows=109024 width=9) (actual time=0.025..0.030 rows=3 loops=2)
> Recheck Cond: ((u.field_name)::text = (t.key)::text)
> -> Bitmap Index
Tom Lane wrote:
Mario Splivalo writes:
-> Bitmap Heap Scan on photo_info_data u (cost=39134.84..63740.08
rows=109024 width=50) (actual time=270.464..270.469 rows=3 loops=2)
Recheck Cond: ((u.field_name)::text = (t.key)::text)
-> Bitmap Index Scan on photo_info_data_p
Mario Splivalo writes:
> -> Bitmap Heap Scan on photo_info_data u (cost=39134.84..63740.08
> rows=109024 width=50) (actual time=270.464..270.469 rows=3 loops=2)
> Recheck Cond: ((u.field_name)::text = (t.key)::text)
> -> Bitmap Index Scan on photo_info_data_pk
> (cost=
I have two tables, like this:
Big table:
CREATE TABLE photo_info_data
(
photo_id integer NOT NULL,
field_name character varying NOT NULL,
field_value character varying,
CONSTRAINT photo_info_data_pk PRIMARY KEY (photo_id, field_name)
)
WITH (OIDS=FALSE);
CREATE INDEX user_info_data_ix_f
10 matches
Mail list logo