If you're doing like
NPC Code:
SELECT * FROM items WHERE itemid=swordtest1
Have you set that 'itemid' is UNIQUE when creating the table?
NPC Code:
CREATE TABLE items(itemid TEXT UNIQUE DEFAULT '')
That would make it easier to index and faster to recall.