Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ud-gl-remove duplicates #52

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Model/lib/wdk/model/questions/queries/geneQueries.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,12 @@
<column name="project_id"/>
<sql>
<![CDATA[
select source_id,gene_source_id,project_id,matched_result from (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use group by here instead of distinct? I would typically only use group by if I am extracting info from the group like min/max/count. Do you have reason to believe the group by would be faster?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I wonder if we should make sure we're not adding duplicates in the genelist installer. We could still put distinct here to make sure, but in Bob's case we have to process 2x the results.

select source_id, t.gene_source_id, t.project_id, 'Y' as matched_result
from @[email protected]_GeneId g, apidbtuning.transcriptattributes t
where (g.gene_source_id = t.gene_source_id OR g.gene_source_id = t.source_id)
and g.user_dataset_id = '$$geneListUserDataset$$'
and g.user_dataset_id = '$$geneListUserDataset$$')
group by source_id,gene_source_id,project_id,matched_result
]]>
</sql>
</sqlQuery>
Expand Down