You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After creating a partial index on a column, if we run a select query with a condition based on that column, we do a full scan of the table instead of using the index:
CREATE INDEX discontinued_products
ON products(discontinued)
WHERE discontinued = 1;
EXPLAIN SELECT
product_id,
product_name,
discontinued
FROM
products
WHERE
discontinued = 1;
Foreign Scan on products (cost=0.00..102.50 rows=1000 width=104)
The text was updated successfully, but these errors were encountered:
After creating a partial index on a column, if we run a select query with a condition based on that column, we do a full scan of the table instead of using the index:
The text was updated successfully, but these errors were encountered: