Re: [PERFORM] weird execution plan

2014-09-14 Thread Huang, Suya
-Original Message- From: pgsql-performance-ow...@postgresql.org [mailto:pgsql-performance-ow...@postgresql.org] On Behalf Of David G Johnston Sent: Saturday, September 13, 2014 7:34 AM To: pgsql-performance@postgresql.org Subject: Re: [PERFORM] weird execution plan Not everyone does so

Re: [PERFORM] weird execution plan

2014-09-12 Thread David G Johnston
Huang, Suya wrote Both queries have been run several times so cache would have same effect on both of them? Below is the plan with buffer information. Not everyone does so its nice to make certain - especially since I'm not all that familiar with the code involved. But since no one else has

[PERFORM] weird execution plan

2014-09-11 Thread Huang, Suya
Hi, Can someone figure out why the first query runs so slow comparing to the second one? They generate the same result... dev=# explain analyze select count(distinct wid) from terms_weekly_20140503 a join port_terms b on a.term=b.terms;

Re: [PERFORM] weird execution plan

2014-09-11 Thread David G Johnston
Huang, Suya wrote Can someone figure out why the first query runs so slow comparing to the second one? They generate the same result... Try: EXPLAIN (ANALYZE, BUFFERS) I believe you are only seeing caching effects. David J. -- View this message in context:

Re: [PERFORM] weird execution plan

2014-09-11 Thread Huang, Suya
-Original Message- From: pgsql-performance-ow...@postgresql.org [mailto:pgsql-performance-ow...@postgresql.org] On Behalf Of David G Johnston Sent: Friday, September 12, 2014 12:45 PM To: pgsql-performance@postgresql.org Subject: Re: [PERFORM] weird execution plan Huang, Suya wrote Can