Re: [PERFORM] explicit casting required for index use

2003-10-27 Thread Neil Conway
On Sat, 2003-10-25 at 13:49, Reece Hart wrote: > Having to explicitly cast criterion is very non-intuitive. Moreover, > it seems quite straightforward that PostgreSQL might incorporate casts This is a well-known issue with the query optimizer -- search the mailing list archives for lots more infor

[PERFORM] explicit casting required for index use

2003-10-26 Thread Reece Hart
Here's the basic issue: PostgreSQL doesn't use indexes unless a query criterion is of exactly the same type as the index type. This occurs even when a cast would enable the use of an index and greatly improve performance. I understand that casting is needed to use an index and will therefore af