Thanks Stephen. After running the vacuum on the table it worked. inspection_development=# explain analyze select item_code from inspector_tool_components where company_id = '7881ff2e-0557-4734-9da8-2d33072ff1ef'; QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------- Index Only Scan using inspector_tool_idx4_1 on inspector_tool_components (cost=0.41..57.87 rows=1226 width=8) (actual time=0.044..0.626 rows=1232 loops=1) Index Cond: (company_id = '7881ff2e-0557-4734-9da8-2d33072ff1ef'::uuid) Heap Fetches: 0 Planning time: 0.190 ms Execution time: 0.778 ms (5 rows)
|