Re: Easy question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bert wrote:
No i didn't defined any indexes for the table, I know the performance
will increase with an index, but this was not my question. My question
furthermore belongs to the access mode of the SQL statement.
Furthermore i do not understand why the Upper function should increase
the performance.

The index will have entries like:

CHRIS
BERT
JOE

and so on.

If you run a query like:

select * from table where UPPER(name) = 'CHRIS';

It's an easy match.

If you don't create an UPPER index, it has to do a comparison with each row - so the index can't be used because postgres has to convert the field to upper and then do the comparison.

--
Postgresql & php tutorials
http://www.designmagick.com/


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux