Use select+insert or replace instead of always using replace