From: Norbert Buchmuller Date: Wed, 2 Sep 2009 02:09:43 +0000 (+0200) Subject: Mentions the possibiliby of creating indexes on SQL function return values. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2552bd763b0bf0b646cf906c12e95aafb1ba0b7e;p=dbsrgits%2FDBIx-Class-Historic.git Mentions the possibiliby of creating indexes on SQL function return values. --- diff --git a/lib/DBIx/Class/Manual/Cookbook.pod b/lib/DBIx/Class/Manual/Cookbook.pod index 085120a..8867e3f 100644 --- a/lib/DBIx/Class/Manual/Cookbook.pod +++ b/lib/DBIx/Class/Manual/Cookbook.pod @@ -409,8 +409,10 @@ Then call your new method in your code: =head2 Using SQL functions on the left hand side of a comparison -Using SQL functions on the left hand side of a comparison is generally -not a good idea since it requires a scan of the entire table. However, +Using SQL functions on the left hand side of a comparison is generally not a +good idea since it requires a scan of the entire table. (Unless your RDBMS +supports indexes on expressions - including return values of functions -, and +you create an index on the return value of the function in question.) However, it can be accomplished with C when necessary. If you do not have quoting on, simply include the function in your search