private function deleteOrphanedUrls()
    {
        $query = $this->connection->createQueryBuilder();
        $query
            ->select($this->connection->quoteIdentifier('url.id'))
            ->from($this->connection->quoteIdentifier(self::URL_TABLE), 'url')
            ->leftJoin(
                'url',
                $this->connection->quoteIdentifier(self::URL_LINK_TABLE),
                'link',
                'url.id = link.url_id'
            )
            ->where($query->expr()->isNull('link.url_id'))
        ;

        $statement = $query->execute();

        $ids = $statement->fetchAll(PDO::FETCH_COLUMN);
        if (empty($ids)) {
            return;
        }

        $deleteQuery = $this->connection->createQueryBuilder();
        $deleteQuery
            ->delete($this->connection->quoteIdentifier(self::URL_TABLE))
            ->where($deleteQuery->expr()->in('id', ':ids'))
            ->setParameter(':ids', $ids, Connection::PARAM_STR_ARRAY)
        ;

        $deleteQuery->execute();
    }
private function deleteOrphanedUrls()
    {
        $query = $this->connection->createQueryBuilder();
        $query
            ->select($this->connection->quoteIdentifier('url.id'))
            ->from($this->connection->quoteIdentifier(self::URL_TABLE), 'url')
            ->leftJoin(
                'url',
                $this->connection->quoteIdentifier(self::URL_LINK_TABLE),
                'link',
                'url.id = link.url_id'
            )
            ->where($query->expr()->isNull('link.url_id'))
        ;

        $statement = $query->execute();

        $ids = $statement->fetchAll(PDO::FETCH_COLUMN);
        if (empty($ids)) {
            return;
        }

        $deleteQuery = $this->connection->createQueryBuilder();
        $deleteQuery
            ->delete($this->connection->quoteIdentifier(self::URL_TABLE))
            ->where($deleteQuery->expr()->in('id', ':ids'))
            ->setParameter(':ids', $ids, Connection::PARAM_STR_ARRAY)
        ;

        $deleteQuery->execute();
    }
private function deleteOrphanedUrls ( ) { $ query = $ this -> connection -> createQueryBuilder ( ) ; $ query -> select ( $ this -> connection -> quoteIdentifier ( 'url.id' ) ) -> from ( $ this -> connection -> quoteIdentifier ( self :: URL_TABLE ) , 'url' ) -> leftJoin ( 'url' , $ this -> connection -> quoteIdentifier ( self :: URL_LINK_TABLE ) , 'link' , 'url.id = link.url_id' ) -> where ( $ query -> expr ( ) -> isNull ( 'link.url_id' ) ) ; $ statement = $ query -> execute ( ) ; $ ids = $ statement -> fetchAll ( PDO :: FETCH_COLUMN ) ; if ( empty ( $ ids ) ) { return ; } $ deleteQuery = $ this -> connection -> createQueryBuilder ( ) ; $ deleteQuery -> delete ( $ this -> connection -> quoteIdentifier ( self :: URL_TABLE ) ) -> where ( $ deleteQuery -> expr ( ) -> in ( 'id' , ':ids' ) ) -> setParameter ( ':ids' , $ ids , Connection :: PARAM_STR_ARRAY ) ; $ deleteQuery -> execute ( ) ; }
Delete all orphaned URLs.

That could be avoided if the feature is implemented there.

URL is orphaned if it is not linked to a content attribute through ezurl_object_link table.
Delete all orphaned URLs .