Hi,
I recently switched to PostgreSQL from MySQL so that I can use PL/R for data
analysis. The query in MySQL form (against a more complex table structure)
takes ~5 seconds to run. The query in PostgreSQL I have yet to let finish,
as it takes over a minute. I think I have the correct table structu
On Wed, May 19, 2010 at 8:06 PM, Scott Marlowe wrote:
> On Wed, May 19, 2010 at 8:04 PM, Scott Marlowe
> wrote:
>> On Wed, May 19, 2010 at 7:46 PM, Matthew Wakeling
>> wrote:
>>> On Wed, 19 May 2010, Scott Marlowe wrote:
>
> It's apparently estimating (wrongly) that the merge join won'
On Wed, May 19, 2010 at 8:04 PM, Scott Marlowe wrote:
> On Wed, May 19, 2010 at 7:46 PM, Matthew Wakeling wrote:
>> On Wed, 19 May 2010, Scott Marlowe wrote:
It's apparently estimating (wrongly) that the merge join won't have to
scan very much of "files" before it can stop because
On Wed, May 19, 2010 at 7:46 PM, Matthew Wakeling wrote:
> On Wed, 19 May 2010, Scott Marlowe wrote:
>>>
>>> It's apparently estimating (wrongly) that the merge join won't have to
>>> scan very much of "files" before it can stop because it finds an eid
>>> value larger than any eid in the other ta
On Wed, 19 May 2010, Scott Marlowe wrote:
It's apparently estimating (wrongly) that the merge join won't have to
scan very much of "files" before it can stop because it finds an eid
value larger than any eid in the other table. So the issue here is an
inexact stats value for the max eid.
I wan
On Wed, May 19, 2010 at 2:27 PM, Scott Marlowe wrote:
> On Wed, May 19, 2010 at 10:53 AM, Tom Lane wrote:
>> Matthew Wakeling writes:
>>> On Tue, 18 May 2010, Scott Marlowe wrote:
Aggregate (cost=902.41..902.42 rows=1 width=4)
-> Merge Join (cost=869.97..902.40 rows=1 width=4)
>
On Wed, May 19, 2010 at 10:53 AM, Tom Lane wrote:
> Matthew Wakeling writes:
>> On Tue, 18 May 2010, Scott Marlowe wrote:
>>> Aggregate (cost=902.41..902.42 rows=1 width=4)
>>> -> Merge Join (cost=869.97..902.40 rows=1 width=4)
>>> Merge Cond: (f.eid = ev.eid)
>>> -> Index
On Wed, May 19, 2010 at 10:53 AM, Tom Lane wrote:
> Matthew Wakeling writes:
>> On Tue, 18 May 2010, Scott Marlowe wrote:
>>> Aggregate (cost=902.41..902.42 rows=1 width=4)
>>> -> Merge Join (cost=869.97..902.40 rows=1 width=4)
>>> Merge Cond: (f.eid = ev.eid)
>>> -> Index
Matthew Wakeling writes:
> On Tue, 18 May 2010, Scott Marlowe wrote:
>> Aggregate (cost=902.41..902.42 rows=1 width=4)
>> -> Merge Join (cost=869.97..902.40 rows=1 width=4)
>> Merge Cond: (f.eid = ev.eid)
>> -> Index Scan using files_eid_idx on files f
>> (cost=0.00