Re: Performance killed with FDW when using CAST. - Mailing list pgsql-admin

From Thomas Kellerer
Subject Re: Performance killed with FDW when using CAST.
Date
Msg-id q96go6$6fn4$1@blaine.gmane.org
Whole thread Raw
In response to Re: Performance killed with FDW when using CAST.  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: Performance killed with FDW when using CAST.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Laurenz Albe schrieb am 17.04.2019 um 07:03:
>> We setup a FDW server for a large table that has an hstore data type as on eof the coums.
>>
>> When we run the query directly on the FDW server
>>
>> select * from recent_events where account_id = 1 AND (attributes -> 'account_incident_id')::integer = 2617116 limit
10;
>>
>> The response is 2ms . which is awesome.
>>
>> When we run it from the remote server where we have the server defined, the query never returns.
>>
>> Our server definition is as follows.
>>
>> (host 'fdwserver', dbname 'mydb', port '5432', fetch_size '1000', use_remote_estimate 'true', extensions 'hstore')
> 
> After debugging into this, it seems that the hstore operator -> cannot
> be pushed down because of collation problems.

Do you happen to know if the JSONB operator -> (or ->>) can be pushed down? 

Although I realize it would be a major change in the database design, maybe that would be a solution for Jorge. 

Thomas






pgsql-admin by date:

Previous
From: Michel Feinstein
Date:
Subject: Re: pgAdmin Saved Password Security
Next
From: arvind chikne
Date:
Subject: symmetricds