Skip to content

Instantly share code, notes, and snippets.

View amitu's full-sized avatar
😀
Building fastn.com

Amit Upadhyay amitu

😀
Building fastn.com
View GitHub Profile
with table_stats as (
select psut.relname,
psut.n_live_tup,
1.0 * psut.idx_scan / greatest(1, psut.seq_scan + psut.idx_scan) as index_use_ratio
from pg_stat_user_tables psut
order by psut.n_live_tup desc
),
table_io as (
select psiut.relname,
sum(psiut.heap_blks_read) as table_page_read,
eventsource
go-eventsource
client/client
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal