'Nesting where query to run faster in SQLite
I'm trying to run this SQL code in a BI tool and that does not allow any set statement, temp tables or indexing.
This query runs for more than 30 mins as this a big table with millions of rows.Can anyone help me with nesting/subquery or any other possible way to make this run faster?
SELECT distinct d.id, d.value, v.site
FROM dx d
JOIN visit v
ON d.id =v.id
where v.value like "I disorder, %"
or v.value like "disorder,%"
or v.value like "Other disorders"
or v.value like "II disorder"
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|