Reply: Can we specify transaction level - Mailing list pgsql-general

From guxiaobo1982
Subject Reply: Can we specify transaction level
Date
Msg-id tencent_453F222D493643FF06724677@qq.com
Whole thread Raw
Responses Re: Reply: Can we specify transaction level  (bricklen <bricklen@gmail.com>)
List pgsql-general
what does a wrapper function mean, count is a standard function in Greenplum, or how to creat the wrapper function.

regards

On Fri, Jul 19, 2013 at 7:47 AM, guxiaobo1982 <guxiaobo1982@qq.com> wrote:
 
 There is another situation,
 
We have a demo table with about 17000000 rows,  the "select count(1) from  demotable" statement finishes with-in 3  seconds when executed directlly against the Greenplum database,but it takes about 230 seconds to finish when executed via postgres_fdw inside PostgreSQL 9.3 beta2, I guess that it may because of postgres_fdw pulling data to the PostgreSQL instance and counts the rows there, but I think the query optimizer should pass through the count() function to the Greenplum end, and gets only the result back.
 
Are you able to create a function in Greenplum which is a wrapper around that count(*) and call that via the postgres_fdw? 



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Insert result does not match record count
Next
From: bricklen
Date:
Subject: Re: Reply: Can we specify transaction level