Add index on the pua table for peformance reasons.

Credits go to "lirakin" on IRC

(cherry picked from commit 59061f158db03c6d00f0d3121e8db1536ec43aba)