![]() ![]() Push aggregates to foreign data wrapper servers, where possible (Jeevan Chalke, Ashutosh Bapat) Thanks to this improvement in Postgres 10: It is interesting that refreshing the materialized view takes a similar time to selecting from the foreign table: The materialized view is much faster, but also a contrived example. SELECT left(greeting, 1) AS first_letter, COUNT(*) Now we can compare select times for foreign tables and materialized views: +-+-Īnd create a materialized view on the foreign table:ĬREATE MATERIALIZED VIEW mat_view (first_letter, count) AS OPTIONS (host 'localhost', dbname 'fdw_test') ĬREATE USER MAPPING FOR PUBLIC SERVER postgres_fdw_testĬREATE FOREIGN TABLE other_world (greeting TEXT) ![]() Let's see this in action! First, let's set up the foreign table:ĬREATE SERVER postgres_fdw_test FOREIGN DATA WRAPPER postgres_fdw Transparent data integration for Postgres-based databases. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |