Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 4 of 4 total |
Custom Functions |
Sat, Sep 2 2006 11:09 AM | Permanent Link |
"Robert Eastlack" | If I define a custom SQL function: FormatMyString(StringToFormat, Format)
Then call it in this SQL: SELECT * FROM MyTable WHERE MyField = FormatMyString('Testing', 'X') Will it execute FormatMyString just once, at the beginning of the query, or will it do it for every record in the table? Obviously if it is executing for every record that will be dramatically slower, especially if MyField is indexed. Thanks, Robert. |
Sun, Sep 3 2006 4:18 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Robert
Every row in the table. Roy Lambert |
Mon, Sep 4 2006 12:42 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Robert,
<< Will it execute FormatMyString just once, at the beginning of the query, or will it do it for every record in the table? Obviously if it is executing for every record that will be dramatically slower, especially if MyField is indexed. >> As long as you only pass it constant values, then it will only execute it once. If you pass it a column, then DBISAM will be forced to execute it once for every record in the table. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Sep 5 2006 11:38 AM | Permanent Link |
"Robert Eastlack" | "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message
news:8ED1AF3D-185F-4410-A809-234F532056D6@news.elevatesoft.com... > Robert, > > << Will it execute FormatMyString just once, at the beginning of the > query, or will it do it for every record in the table? Obviously if it is > executing for every record that will be dramatically slower, especially if > MyField is indexed. >> > > As long as you only pass it constant values, then it will only execute it > once. If you pass it a column, then DBISAM will be forced to execute it > once for every record in the table. Thank you Tim, that's exactly what I was hoping you would say. |
This web page was last updated on Thursday, May 23, 2024 at 03:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |