Module12_Routine_Maintenance Flashcards

1
Q

what are the 3 maintenance commands

A

Analyze
vacuum
cluster

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

how to analyze 1 table

A

analyze table_name;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what does vacuum full do?

A

rewrite the entire table with only valid rows. whole table will be blocked and extra disk is used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

how can we prevent transaction ID wraparround failures

A

by performing vacuum

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

where are the visibility map stored

A

stored ar <relfilenode>_vm (visibility map)</relfilenode>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what are the 2 actions autovacuum can’t do

A

perform a VACUUM FULL and vacuum temporary tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

how to enable or change autovacuum for 1 table

A

alter table TABLE_NAME autovaccum_enabled;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

how to rebuild an index

A

reindex index/table/schema/database NAME;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

how to perform vacuum and analyze on database at once from OS

A

vacuumdb -az (A is for all databases and Z is for analyze)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly