Don't selecting inserted/updated row, if database can return it at once.
Don't calling insert_id() if id is already known.