I have a table, like this:
CREATE TABLE films (
title varchar(40) NOT NULL,
did integer NOT NULL,
date_prod date,
kind varchar(10)
);
I have a index, like this:
CREATE INDEX films_title_kind_idx ON films (title, kind);
I have a query, like this:
SELECT title, did, kind, date_prod
FROM films
WHERE title = 'title1' AND
kind = 'kind2' AND
did = 4;
Should I create index with 3 columns? Or current index films_title_kind_idx is enough?