I have a query like this:
SELECT *
FROM my_table_1
INNER JOIN my_table 2
USING(column_name)
WHERE my_table_1.date=<my_date>
my_table_1 has millions of lines, but I only want the entries with date=<my_date>
How PSQL query is processed? Is it worth to make an inner join only in the part of the table my_table_1 I want, like:
SELECT *
FROM (
SELECT *
FROM my_table_1
WHERE my_table_1.date=<my_date>
) A
INNER JOIN my_table 2
USING(column_name)
Or the query is processed in a way such that where I put WHERE clause doesn't matter after all?