How do I track stats on foreign table access through foreign data wrapper?

Поиск
Список
Период
Сортировка
От David Crawford
Тема How do I track stats on foreign table access through foreign data wrapper?
Дата
Msg-id CAD1pZeH0h-LjHuKX-782nFoyMv-39y0cKtGx+0ZzOSNPvWXcMg@mail.gmail.com
обсуждение исходный текст
Список pgsql-performance
Hi,

I'm using a foreign data wrapper to access mongodb and I'm looking for a way to monitor query stats against foreign tables.

It looks like the common methods have limited support for foreign tables at this time.  pg_stat_statements collects the query, total time, and rows returned, which is useful.  But all the disk access stats are zero (understandably).  Looks like pg_stat_all_tables doesn't have any info on foreign tables from my tests.

I'm interested in the following:
  • Foreign table rows read
  • Foreign table bytes read
  • Foreign table read time
I'm working with my own fork of the FDW, so I could build these in myself, but I was wondering if there's more generic support for this sort of stuff.  Or at the least, if I do implement it can I push it into another stats collection framework rather than logging it.

Thanks,
David Crawford

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Limit & offset effect on query plans
Следующее
От: Patryk Sidzina
Дата:
Сообщение: Re: Why is PostgreSQL 9.2 slower than 9.1 in my tests?