def _execute(self, uow):
        self._session = uow.session
        sql = '''select tags.id, tags.name, tags.synonym_code
        from tags left join items_tags on tags.id = items_tags.tag_id
        where items_tags.item_id is NULL
        '''
        hangingTags = self._session.query(db.Tag).from_statement(sql).all()
        count = len(hangingTags)
        for tag in hangingTags:
            self._session.delete(tag)
        if count > 0:
            self._session.commit()
        return count