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

Create join tables for less well defined fields. #522

Merged
merged 2 commits into from
May 23, 2017
Merged

Conversation

cacraig
Copy link
Contributor

@cacraig cacraig commented May 23, 2017

So as you alluded to in the last PR for this @harrisj - I was using a single year of a partitioned count table to get the distinct values of certain fields that are not a distinct entity within the CDE. (sex_code, age_num, year, etc.) .

Problem: Even the single year partitions are wayyyyyy to large to use a SELECT DISTINCT ... on.

Proposed Solution: So I created views that only contain these distinct values. Then all the queries can join using these tables. End result = Much faster queries (and hopefully no more timed out requests).

@cacraig
Copy link
Contributor Author

cacraig commented May 23, 2017

Once again, I can't seem to tag any reviewers - so can you take a look at this when you get a chance, @harrisj ? Thanks!

@harrisj
Copy link
Contributor

harrisj commented May 23, 2017

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants