This is a bit strange, it should change by definition. The number of G-vectors is determined by the ecutrho input variable. If you do not have defined, it is set to 4 times the cutoff for the wavenfution (ecutwfc), assuming you are using norm-conserving pseudopotential. In case you are using ultrasoft pseudos, this is an experimental feature in Yambo and it is strongly discouraged.I have tried to lower the kinetic energy cut-off in scf calculation. But the total G vector number doesn't vary with the kinetic energy cut-off.
If you want you can post your nscf input file of QE and we will have look. Actually, I do not know where the problem in reading the ns.db1 database comes from, maybe someone more expert than me in netcdf library can help you on this issue. In any case a calculation with 20M G-vector I would say that it is unfeasable.
Best,
Daniele