1

I was looking at how does the query works basically through EXPLAIN keyword which gives you an execution plan about what happens in order when you execute the query. So I was wondering if there is some way in which we can change the execution plan for our query (more specifically to scan the table in our own customized way on a particular query rather than its own default scan)

I was looking at execution plan for my query how its working and wanted to run it in my own way but haven't been able to find anythin on that.

Umer Freak
  • 21
  • 3

1 Answers1

0

In addition to the answer, two other ways to change the query execution plan are to

  1. Use indexes: You can create or drop indexes on specific columns to influence the query optimizer to use different execution plans. PostgreSQL provides several types of indexes which you can use.

  2. Materialized views: PostgreSQL provides materialized views, which are precomputed views that are stored in the database. By using these views, you can reduce the amount of computation required as you can just load the precomputed views.

tokamak32
  • 27
  • 7