Re: Help Me Understand Why I'm Getting a Bad Query Plan
От | marcin mank |
---|---|
Тема | Re: Help Me Understand Why I'm Getting a Bad Query Plan |
Дата | |
Msg-id | b1b9fac60903242004p5fe8b68fwd6f1ada767766b21@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Help Me Understand Why I'm Getting a Bad Query Plan (Bryan Murphy <bmurphy1976@gmail.com>) |
Ответы |
Re: Help Me Understand Why I'm Getting a Bad Query Plan
|
Список | pgsql-performance |
There is one thing I don`t understand: -> Nested Loop (cost=0.00..180564.28 rows=1806 width=37) (actual time=0.192..60.214 rows=3174 loops=1) -> Index Scan using visitors_userid_index2 on visitors v (cost=0.00..2580.97 rows=1300 width=33) (actual time=0.052..2.342 rows=897 loops=1) Index Cond: (userid = 'fbe2537f21d94f519605612c0bf7c2c5'::bpchar) -> Index Scan using itemexperiencelog__index__visitorid on itemexperiencelog l (cost=0.00..134.04 rows=230 width=70) (actual time=0.013..0.040 rows=4 loops=897) Index Cond: (l.visitorid = v.id) If it expects 1300 visitors with the userid, and for each of them to have 230 entries in itemexperiencelog, how can it come up with 1806 returned rows (and be about right!)? Greetings Marcin
В списке pgsql-performance по дате отправления: