After some more digging I found there was an index:
CREATE INDEX job_list_status_idx
ON job_list
USING btree
(status(event_no));
I had previously created. I must have changed the function from IMMUTABLE
to STABLE after creating the index or I assume I wouldn't have been able to
create th
All,
I've a query:
SELECT
c.code, c.pc_no, jl.event_no, jl.order_number, jl.location, s.status,
cs.commercial_status
FROM
((codes as c JOIN job_list as jl ON c.id = jl.code_id) JOIN status as s
ON jl.event_no = s.event_no)
JOIN commercial_status AS cs on jl.event_no = cs.event_n