Great answer by @tallistroan! Another method is to use the Field Calculator to geospatially return a set of attributes if a point from one layer lies in the exact same position as in another layer.
You need to have the refFunctions plugin installed and enabled by going to the menubar:
Plugins > Manage and Install Plugins...
Then use the Field Calculator on your 20k points layer, add a field (e.g. string) and use an expression like:
geomequals( 'layer_name', 'field_name')
layer_name = the name of your 20k points layer.
field_name = the name of any field from your 23 lakh points layer.
It does not matter what field you use because if there is a value, it means that that point exists in the exact same place for both layers. If the value is empty or
NULL then it means only the point from the 20k layer exists at that point (assuming the field you chose for the expression has no blank values).
Now from the Attribute Table of your 20k points layer, you can sort the new field into ascending order and select all features which has a value in the new field. Then right-click the layer and select
Save As... and make sure you check the
Save only selected features option to save it as a new layer (or use the Save selected features tool from the Processing Toolbox).
Another possible solution is to create a single string field which will contain your geom values. So if you have
lon fields, you can create a new field (in both your layers) with the expression:
concat( "Lat", "Long")
I would suggest using virtual fields to speed things up (make sure your two shapefiles are saved in a project for the time being). Then right-click your 20k points layer and go to
Properties > Joins. Then select the other layer and select the new string fields you created. The attributes of the other layer will be shown in your 20k points layer. Use one of the fields from the other layer and if there are any
NULL values, it means it doesn't exist in the 20k layer. Then apply the final steps as described in my previous approach.