PostgreSQL 8.1.8 with function SELECT TRANSLATE($1, 'áéíóúàèìòùãõâêîôôäëïöüçÁÉÍÓÚÀÈÌÒÙÃÕÂÊÎÔÛÄËÏÖÜÇ', 'aeiouaeiouaoaeiooaeioucAEIOUAEIOUAOAEIOOAEIOUC') and table with over a million records takes over 20 seconds for an ilike search on text field. What is my best option or solution to this problem besides upgrading PostgreSQL. Select command is in PHP file.