Skip to content

Migrate mentions for commit notes

Number of rows affected

Commit notes with mentions ~168344

explain select * from notes where noteable_type = 'Commit' and note like '%\@%'

 Index Scan using index_notes_on_noteable_id_and_noteable_type on public.notes  (cost=0.57..17022654.92 rows=904698 width=4) (actual time=29250.487..5175737.441 rows=168344 loops=1)
   Index Cond: ((notes.noteable_type)::text = 'Commit'::text)
   Filter: (notes.note ~~ '%\@%'::text)
   Rows Removed by Filter: 9332643
   Buffers: shared hit=979613 read=6975042 dirtied=59029
   I/O Timings: read=5108286.968
Edited by Alexandru Croitor