Replace ilike by like on search on Reference field
The clause "reference" ilike 'model name,%'
can not be optimized by an index but the form "reference" like 'model name,%'
can with an index on reference
with COLLATE "C"
.
So we should always use this form on reference because we know it is not case dependent.