Commits

Zhang Huangbin  committed c13419c

Add limit=1 for performance improvement while searching accounts.

  • Participants
  • Parent commits 792b663

Comments (0)

Files changed (1)

File src/plugins/sql_alias_access_policy.py

     #   result = dbConn.query('''SELECT * FROM alias WHERE address=$recipient''', vars=senderReceiver,)
 
     result = dbConn.select('alias',
-        senderReceiver, where='address = $recipient AND domain = $recipient_domain',
-    )
+                           senderReceiver,
+                           where='address = $recipient AND domain = $recipient_domain',
+                           limit=1,
+                          )
 
     # Return if recipient account doesn't exist.
     if len(result) != 1: