I have two attribute tables in qgis:
- One table has around 20 million records
- The second table has around 40k records.
I make a join (under Layer-Properties->Joins) in 2nd table and get some data from table 1 and put that into table 2 based on a single Id column. Now I want to verify the data that it is correctly joined but when i put an id into feature search it gets hang as table 1 is very large.
Is there any efficient way available to deal with such a large data set?
I have tried to write a script to verify data but still after running the whole day it is unable to produce any result still running and my QGIS project seems hang:
layerUpdateName = "Extra" #Name of the layer whose data want to update layerUpdateColumn = "toid" #Column name to update layerGetName = "Data_Tbl" #Name of the layer from data will be get layerGetColumn = "TOID" #Cloum name from where value will be taken dataMatchColumnName = "LOTID" #getting the desired layer if QgsProject.instance().mapLayersByName(layerUpdateName): layerUpdate = QgsProject.instance().mapLayersByName(layerUpdateName); if QgsProject.instance().mapLayersByName(layerGetName): layerGet = QgsProject.instance().mapLayersByName(layerGetName); a = 0 for lg in layerGet.getFeatures(): a += 1 for lu in layerUpdate.getFeatures(): if lu[layerUpdateColumn] == lg[layerGetColumn]: print (lu[layerUpdateColumn]) break;