Re: [GENERAL] Using an index to materialize a function

2013-08-16 Thread Tom Lane
Kevin Grittner writes: > Robert James wrote: >> If I have a slow_function(), and I create an index of >> slow_function(field), will Postgres use that index to avoid having to >> recompute the function? >> >> Example: >> SELECT slow_function(field1) FROM table1 WHERE id = 5 >> >> It won't use th

Re: [GENERAL] Using an index to materialize a function

2013-08-16 Thread Kevin Grittner
Robert James wrote: > If I have a slow_function(), and I create an index of > slow_function(field), will Postgres use that index to avoid having to > recompute the function? > > Example: > > SELECT slow_function(field1) FROM table1 WHERE id = 5 > > It won't use the index on field1 to _find_ the r

[GENERAL] Using an index to materialize a function

2013-08-16 Thread Robert James
If I have a slow_function(), and I create an index of slow_function(field), will Postgres use that index to avoid having to recompute the function? Example: SELECT slow_function(field1) FROM table1 WHERE id = 5 It won't use the index on field1 to _find_ the record. Can it use it to compute the