The “view” materialization will almost always be faster because views do not store any data. But there are situations where the “table” (or other) materializations can perform better overall, depending on the sorts of queries issued against your model.
If you were using backend database as snowflake then you can check who takes more time there in Query History tab. All querys you execute on dbt at the end they hits to snowflake so you can check there. It stores the details long to 7 days prior to that you can check the query details.
I am using postgres as database,So I want to have clarity that
Is materialised view in postgres is different from materialised view in dbt?
As u said view do not stores data ,But in materialised view of postgres data is stored that is why execution is faster in materialised view of postgres as it does not run the query again and again.
Am I missing something ?
As far as I know, dbt does not yet support the creation or maintenance of materialized views (but that functionality is planned for a future release). I cannot speak to to the performance characteristics of dbt’s “table” materialization vs an equivalent Postgres materialized view.