Open frodrigo opened 4 years ago
@jocelynj The dynpoi_status (like marker) table already have an index on uuid as primary key (and a second for 0.2 API retro compact)
"dynpoi_status_pkey" PRIMARY KEY, btree (uuid)
"idx_dynpoi_status_id" btree (uuid_to_bigint(uuid))
The issue os not about index on dynpoi_status.
osmose_frontend=> UPDATE
dynpoi_status
SET
subtitle = marker.subtitle
FROM
marker
WHERE
marker.source = 36623 AND
dynpoi_status.uuid = marker.uuid
;
UPDATE 0
Temps : 542,017 ms
That's fun, I studied this query. If I remember correctly we had a bad estimation on marker.source cardinality. Maybe we can try by increasing statistic size on this column.
@anayrat : is it something that we can easily try?
I started to work on it but not finished yet. I hope I will be available to spend some time on this issue this week.
Note, since long time, I plan to merge marker and dyna_status.