I am new to using Postgres and I have a question concerning Materialized views. I am currently using Postgres 9.6.0 and PGAdmin 4.
I have a query that is composed of a number of joins and when it's executed in PGAdmin, it takes approximately 13 seconds. This is true, considering the correct indices are set.
The next approach is to use Materialized Views. By using Materialized Views and setting the appropriate indices, I would have assumed that running a query would be a lot faster given that the data would be cached/ temporarily stored. However after running the query, it looks like it still takes 13 seconds.....
Unless my understanding of Materialized Views is not correct, can someone please explain why executing the materialized view would take as long as running the query. Could it be PGAdmin causing this issue? Or is there a setting within Postgres that needs to be set perhaps for data to be persistent in the materialized view?
Any advice is appreciated. Thanks.