Postgresql – Optimize query on partitioned table without partitioning key in the WHERE clause
We are trying to optimize a query to a partitioned table, the query looks something like this: SELECT col1, col2 FROM partitioned_table WHERE profile_id = '00000000-0000-0000-0000-000000000000' AND product_id = 'product_a' ORDER BY created_at DESC LIMIT 500; Parent/partitioned table definition: CREATE…