implemented proper sqlite pragmas for increased performance