3 Comments

Thanks for sharing! 🙌 Just ran it on one of our GCP projects. Potentially a few thousand dollars a year we can save 💸

Expand full comment

Run at own risk, but it's pretty cool that you can wrap the query above in:

FOR resulting_row IN (

... the query with a filter to only include rows that save cost ...

) DO EXECUTE IMMEDIATE(resulting_row.command); END FOR;

to actually apply the command directly with the query. I find scripts like above quite powerful and potentially dangerous :)

Expand full comment

thanks a lot Robert! FYI a small typo slip through on row 25: "compression_reate" instead of "compression_rate" ;)

Expand full comment