direct sql stuff, one scraping thread