OHDSI / SelfControlledCaseSeries

An R package for performing Self-Controlled Case Series (SCCS) analyses in an observational database in the OMOP Common Data Model.
http://ohdsi.github.io/SelfControlledCaseSeries
13 stars 8 forks source link

Replace INSERT INTO SQL statements with SELECT INTO statements for increased speed #18

Open schuemie opened 4 years ago

schuemie commented 4 years ago

On MPP database platforms, INSERT INTO statements as used here are extremely slow. We should use SELECT INTO statements, creating several temp tables, and merging them into the final temp table using another SELECT INTO. This will be several orders of magnitude faster on some platforms.