This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import obspython as obs | |
import subprocess | |
import os | |
import re | |
import datetime | |
# Info for potential OBS Python hackers! | |
# Tip 1 - Read the "OBS Studio Backend Design" documentation page. Read the documentation table of contents. | |
# Tip 2 - be sure to add obspython.py to your script path to enable completion. | |
# Tip 3 - Some of the Python API is generated at runtime, so it won't show up in obspython.py. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
*, | |
pg_size_pretty(table_bytes) AS table, | |
pg_size_pretty(index_bytes) AS index, | |
pg_size_pretty(total_bytes) AS total | |
FROM ( | |
SELECT | |
*, total_bytes - index_bytes - COALESCE(toast_bytes, 0) AS table_bytes | |
FROM ( | |
SELECT |