Skip to content

Instantly share code, notes, and snippets.

@rbuels
Created April 15, 2011 18:19
Show Gist options
  • Save rbuels/922184 to your computer and use it in GitHub Desktop.
Save rbuels/922184 to your computer and use it in GitHub Desktop.
cxgn=# select now()-query_start, current_query from pg_stat_activity where usename = 'web_usr' and current_query not like '<IDLE>%';
?column? | current_query
-----------------+---------------------------------------------------------------------------------------------
00:00:31.513223 | select distinct stock_id FROM public.stockprop
: JOIN public.stock USING (stock_id)
: JOIN public.cvterm ON cvterm.cvterm_id = stockprop.type_id
: JOIN phenome.allele on allele.allele_id = (cast(stockprop.value as numeric ) )
: WHERE cvterm.name = $1 AND locus_id = $2 AND allele.obsolete = $3
00:00:39.178288 | select distinct stock_id FROM public.stockprop
: JOIN public.stock USING (stock_id)
: JOIN public.cvterm ON cvterm.cvterm_id = stockprop.type_id
: JOIN phenome.allele on allele.allele_id = (cast(stockprop.value as numeric ) )
: WHERE cvterm.name = $1 AND locus_id = $2 AND allele.obsolete = $3
(2 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment