Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

A page for developers and ops staff recording handy queries and updates

For Devs: Get a psql console in the k8s cluster by finding the pod name of one of the running psql instances and running kubectl exec PODNMAE -n dcb-dev -it -- psql

List bib record counts by source system

select h.name, c.count 
from ( select source_system_id id, count(*) count from bib_record group by source_system_id ) c,
     host_lms h 
where c.id = h.id;

Refresh the stats (Will improve performance on ingest and reclaim deleted space)

vacuum analyze;
possibly better:
vacuum (verbose, analyze, skip_locked);

Check for deleted cluster records (There should be NO clusters with no bib record where is_deleted is null)

select is_deleted,
       count(cr.) 
from cluster_record cr 
where not exists ( select br. from bib_record br where br.contributes_to = cr.id ) 
group by is_deleted;

Switch on a specific source for ingest

update host_lms set client_config = client_config || '{"ingest":true}' where code='CODE';
  • No labels