You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following query takes long time. Is it possible to optimize it ?
UPDATE wt_1 AS w SET is_exonic=True FROM refgene_exon_hg38 AS r WHERE w.chr=r.chr AND w.pos <@ r.exonrange
(venv) ➜ regovar git:(master) ✗ sql regovar "explain update wt_1 as w set is_exonic=True from refgene_exon_hg38 as r where w.chr=r.chr AND w.pos <@ r.exonrange"
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------
Update on wt_1 w (cost=0.29..46206757.52 rows=23403374 width=1114)
-> Nested Loop (cost=0.29..46206757.52 rows=23403374 width=1114)
-> Seq Scan on wt_1 w (cost=0.00..57623.45 rows=681645 width=1108)
-> Index Scan using refgene_exon_hg38_exonange_idx on refgene_exon_hg38 r (cost=0.29..66.33 rows=137 width=32)
Index Cond: (w.pos <@ exonrange)
Filter: (w.chr = chr)
refgene_exon_hg38 is the table with the list of all exons (658213 rows, with index on (chr, exonrange))
CREATE INDEX refgene_exon_hg38_chrom_exonange_idx
ON refgene_exon_hg38
USING btree (bin, chr, exonrange);
CREATE INDEX refgene_exon_hg38_exonange_idx
ON refgene_exon_hg38
USING gist (exonrange);
wt_1 is the working table created for an analysis (here the analysis with the id=1), with all variant s and their annotations
The text was updated successfully, but these errors were encountered:
The following query takes long time. Is it possible to optimize it ?
refgene_exon_hg38
is the table with the list of all exons (658213 rows, with index on (chr, exonrange))wt_1
is the working table created for an analysis (here the analysis with the id=1), with all variant s and their annotationsThe text was updated successfully, but these errors were encountered: