Try adding `joinObject.memoryCache = True` before you initiate the join: from PyQt4.QtCore import * import qgis from qgis.core import QgsMapLayerRegistry, QgsVectorJoinInfo shp = QgsMapLayerRegistry.instance().mapLayersByName( "MyShapefile" )[0] csv = QgsMapLayerRegistry.instance().mapLayersByName( "MyDatabase" )[0] # Set up join parameters shpField='PIN' csvField='UPIN' joinObject = QgsVectorJoinInfo() joinObject.joinLayerId = csv.id() joinObject.joinFieldName = csvField joinObject.targetFieldName = shpField joinObject.memoryCache = True shp.addJoin(joinObject) # shp.createJoinCaches()