I can't figure out how to work with a large dataset. The problem is: I want to know how many points (over 700 000 adresses) are within a polygon layer (it's made out of 5 layers, train noise)(they are both shapefiles). Using the 'Join by location' tool or 'Add polygon attributes to point' (SAGA) would take days to calculate it. I tried using a Spatial lite database and a Postgis database (SQL) but that also took way too long (10 attributes took over a minute to calculate). This is the script I used:
SELECT bag_panden."id", trein_geluid_nacht."fromto" FROM bag_panden inner JOIN trein_geluid_nacht ON ST_Within(bag_panden.geom, trein_geluid_nacht.geom) where bag_panden."id" <= 100
If anyone knows a way to calculate this faster I would like to know how. Maybe a different tool? Some Settings? A different script?
I am using QGIS 2.18.14