add index on parent_id
populate db schema