# There is a table with 100,000,000 records
CREATE TABLE posts (
id BIGSERIAL PRIMARY KEY,
title VARCHAR(255) NOT NULL,
text TEXT NOT NULL
);
#######################################
Query:
SELECT *
FROM posts
WHERE title = 'Python tutorial';
Execution plan:
Seq Scan on posts
(cost=0.00..20834.00 rows=1 width=64)
(actual time=0.025..10350.421 rows=1)
Filter: (title = 'Python tutorial')
Rows Removed by Filter: 99999999
Planning Time: 0.120 ms
Execution Time: 10350.500 ms
What can be seen from this plan? How can it be optimized?