src/dma/collector/sql/sources/postgres/collection-table_details.sql [241:296]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    t.last_analyzed,
    t.last_autoanalyzed,
    t.last_autovacuumed,
    t.last_vacuumed,
    t.vacuum_count,
    t.analyze_count,
    t.autoanalyze_count,
    t.autovacuum_count,
    f.foreign_server_name,
    f.foreign_data_wrapper_name,
    s.heap_blocks_hit,
    s.heap_blocks_read,
    s.index_blocks_hit,
    s.index_blocks_read,
    s.toast_blocks_hit,
    s.toast_blocks_read,
    s.toast_index_hit,
    s.toast_index_read
  from all_objects a
    left join stat_user_tables t on (a.object_id = t.object_id)
    left join statio_user_tables s on (a.object_id = s.object_id)
    left join foreign_tables f on (a.object_id = f.object_id)
)
select :PKEY as pkey,
  :DMA_SOURCE_ID as dma_source_id,
  :DMA_MANUAL_ID as dma_manual_id,
  src.object_id as object_id,
  replace(src.table_schema, chr(34), chr(30)) as table_schema,
  src.table_type as table_type,
  replace(src.table_name, chr(34), chr(39)) as table_name,
  src.total_object_size_bytes as total_object_size_bytes,
  src.object_size_bytes as object_size_bytes,
  src.sequence_scan as sequence_scan,
  src.live_tuples as live_tuples,
  src.dead_tuples as dead_tuples,
  src.modifications_since_last_analyzed as modifications_since_last_analyzed,
  src.last_analyzed as last_analyzed,
  src.last_autoanalyzed as last_autoanalyzed,
  src.last_autovacuumed as last_autovacuumed,
  src.last_vacuumed as last_vacuumed,
  src.vacuum_count as vacuum_count,
  src.analyze_count as analyze_count,
  src.autoanalyze_count as autoanalyze_count,
  src.autovacuum_count as autovacuum_count,
  src.foreign_server_name as foreign_server_name,
  src.foreign_data_wrapper_name as foreign_data_wrapper_name,
  COALESCE(src.heap_blocks_hit, 0) as heap_blocks_hit,
  COALESCE(src.heap_blocks_read, 0) as heap_blocks_read,
  COALESCE(src.index_blocks_hit, 0) as index_blocks_hit,
  COALESCE(src.index_blocks_read, 0) as index_blocks_read,
  COALESCE(src.toast_blocks_hit, 0) as toast_blocks_hit,
  COALESCE(src.toast_blocks_read, 0) as toast_blocks_read,
  COALESCE(src.toast_index_hit, 0) as toast_index_hit,
  COALESCE(src.toast_index_read, 0) as toast_index_read,
  current_database() as database_name
from src;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/dma/collector/sql/sources/postgres/collection-table_details.sql [382:437]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    t.last_analyzed,
    t.last_autoanalyzed,
    t.last_autovacuumed,
    t.last_vacuumed,
    t.vacuum_count,
    t.analyze_count,
    t.autoanalyze_count,
    t.autovacuum_count,
    f.foreign_server_name,
    f.foreign_data_wrapper_name,
    s.heap_blocks_hit,
    s.heap_blocks_read,
    s.index_blocks_hit,
    s.index_blocks_read,
    s.toast_blocks_hit,
    s.toast_blocks_read,
    s.toast_index_hit,
    s.toast_index_read
  from all_objects a
    left join stat_user_tables t on (a.object_id = t.object_id)
    left join statio_user_tables s on (a.object_id = s.object_id)
    left join foreign_tables f on (a.object_id = f.object_id)
)
select :PKEY as pkey,
  :DMA_SOURCE_ID as dma_source_id,
  :DMA_MANUAL_ID as dma_manual_id,
  src.object_id as object_id,
  replace(src.table_schema, chr(34), chr(30)) as table_schema,
  src.table_type as table_type,
  replace(src.table_name, chr(34), chr(39)) as table_name,
  src.total_object_size_bytes as total_object_size_bytes,
  src.object_size_bytes as object_size_bytes,
  src.sequence_scan as sequence_scan,
  src.live_tuples as live_tuples,
  src.dead_tuples as dead_tuples,
  src.modifications_since_last_analyzed as modifications_since_last_analyzed,
  src.last_analyzed as last_analyzed,
  src.last_autoanalyzed as last_autoanalyzed,
  src.last_autovacuumed as last_autovacuumed,
  src.last_vacuumed as last_vacuumed,
  src.vacuum_count as vacuum_count,
  src.analyze_count as analyze_count,
  src.autoanalyze_count as autoanalyze_count,
  src.autovacuum_count as autovacuum_count,
  src.foreign_server_name as foreign_server_name,
  src.foreign_data_wrapper_name as foreign_data_wrapper_name,
  COALESCE(src.heap_blocks_hit, 0) as heap_blocks_hit,
  COALESCE(src.heap_blocks_read, 0) as heap_blocks_read,
  COALESCE(src.index_blocks_hit, 0) as index_blocks_hit,
  COALESCE(src.index_blocks_read, 0) as index_blocks_read,
  COALESCE(src.toast_blocks_hit, 0) as toast_blocks_hit,
  COALESCE(src.toast_blocks_read, 0) as toast_blocks_read,
  COALESCE(src.toast_index_hit, 0) as toast_index_hit,
  COALESCE(src.toast_index_read, 0) as toast_index_read,
  current_database() as database_name
from src;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



