     static let bookmarksQuery = """
         SELECT historyID, url, siteTitle AS title, guid, is_bookmarked, iconID, iconURL, iconType, iconDate, iconWidth, page_metadata.title AS metadata_title, media_url, type, description, provider_name
         FROM (\(bookmarkHighlights))
-            LEFT JOIN view_history_id_favicon ON
-                view_history_id_favicon.id = historyID
+            LEFT JOIN view_favicons_widest ON
+                view_favicons_widest.siteID = historyID
             LEFT OUTER JOIN page_metadata ON
                 page_metadata.cache_key = url
         GROUP BY url

            SELECT history.id AS historyID, history.url AS url, history.title AS siteTitle, guid, history.domain_id, NULL AS visitDate, 1 AS is_bookmarked
            FROM (\(urisForSimpleSyncedBookmarks))
                LEFT JOIN history ON history.url = bmkUri
                \(removeMultipleDomainsSubquery)
            WHERE
                history.title NOT NULL AND
                history.title != '' AND

    static let PruneHistoryRowCount: UInt = 5000

    // Bookmarks Query
    static let urisForSimpleSyncedBookmarks = """
        SELECT bmkUri FROM bookmarksBuffer WHERE server_modified > ? AND is_deleted = 0
        UNION ALL
