PHSKC-APDE / claims_data

Process and analyze WA State Medicaid, Medicare, and All-Payer Claims Database eligibility and claims data
21 stars 4 forks source link

Tweak elig_timevar_collapse.R to allow submitting more IDs #118

Closed dcolombara closed 3 years ago

dcolombara commented 4 years ago

I tried submitting about 70,000 IDs and it broke. "Error: nanodbc/nanodbc.cpp:1617: 42000: [Microsoft][ODBC SQL Server Driver][SQL Server]The query processor ran out of internal resources and could not produce a query plan. This is a rare event and only expected for extremely complex queries or queries that reference a very large number of tables or partitions. Please simplify the query. "

If / when time allows, it might be nice to chop up large queries on the back end, bind the results, and spit them back to the user.

alastairmatheson commented 3 years ago

Addressed this in https://github.com/PHSKC-APDE/claims_data/pull/129. If 1k+ IDs are supplied, they are loaded to a temp table in SQL.