Subject: Re: CAP: Functions to manipulate time in CAP-QL

From: "John Stracke" <[email-masked]>
Date: Tue, 19 Feb 2002 10:25:25 -0500

Doug Royer wrote:

>Patrice Lapierre wrote:
>> 
>>   The CAP-QL seems to be missing operations to manipulate
>> values of type DATE, TIME and DATE-TIME.
>
>Sounds like a great post-CAP is RFC add on, but we don't NEED it
>to get CAP out the door.

Actually, I suspect it's a terrible idea.  Most of the functions Patrice 
is asking for cannot be implemented efficently.  For example, if I get a 
query for "all events between 2PM Eastern Time and 4PM Central Time, on 
Mondays, less than 3 days from the end of the month", no reasonable SQL 
schema in the backend will permit me to turn that into a SQL query; I'll 
have to run a SQL query and then filter the results, which is 
substantially more expensive.

(It *might* be possible to make it sort of work by larding down the schema 
with precomputed values of things like WEEKDAY and NEGMONTHDAY; but doing 
that for every single datetime property would be prohibitively expensive.)

I suspect the same applies for a non-SQL-based system like Notes, too; 
having to convert every single date-time value into one or more arbitrary 
timezones would be a pretty expensive search.  And the UI uses are pretty 
obscure.  I say push it out to the CUA.

/========================================================\
|John Stracke                    |Principal Engineer     |
[email-masked]   |Incentive Systems, Inc.|
|http://www.incentivesystems.com |My opinions are my own.|
|========================================================|
|Illiterate? Write today for free help!                  |
\========================================================/