[Tfug] more RDBMS

Bexley Hall bexley401 at yahoo.com
Wed Oct 24 17:47:54 MST 2007


Hi,

--- Glen Pfeiffer <glen at thepfeiffers.net> wrote:

> On 10/22/2007 07:16 PM, Terence Rudkin wrote:
> > On 10/22/07, Bexley Hall <bexley401 at yahoo.com>
> wrote:
> >> In a VERY LIGHT DUTY APPLICATION, how foolish is
> >> it for clients to periodically issue queries of
> >> the RDBMS like:
> >>
> >>   SELECT now;
> >>
> >> instead of tracking time "locally", themselves?
> >> I.e., use the RDBMS as a time reference instead
> >> of burdening the individual clients (which, in
> >> this case, are kiosks) with the overhead of a
> >> "real" time service?
> >>
> > the database should use the same time service as
> > the client.  So an infrequent sanity check from
> > client to server would be my solution.
>
> To answer the OP's question: In a light duty
> application, 
> selecting the current time will not cause any
> performance issues on the database.
> 
> Why do you need to do this?
> 
> Is it so you can set the local time on the client?
> That certainly 
> seems an awkward design and might not be a good
> idea.

Clients are kiosks.  Need to display some notion
of current time/date for users (though it needn't
have 1 second resolution, etc.).

Seems easiest to just ping the RDBMS server once or
twice a minute and use that to update thte ToD
display.

Also, several clients each with it's own dubious
RTC (don't want to have folks setting the RTC's and
worrying about bad batteries, etc.).  Having a single
reference lets me give clients a coordinated notion
of "The Time" without burdening each with having to
support a timed/ntpd client, etc.

> However, if you are planning on using the time of
> the server so 
> the client can tell whether to retrieve newer data,
> I am all for 
> it. In fact, the client never need see the time the
> table was 
> last updated. You could encapsulate all that logic
> on the 
> database server.
> 
> Or maybe you would rather perform the logic from
> within the 
> query? How about:
> 
> select
>     *
> from
>     table_a
> where
>     now >= (
>         select changed_on 
>         from table_change_log 
>         where table_name = 'table_a'
>     )
> 
> Of course that assumes that there is always data in
> the table, 
> because an empty result set implies there was no
> change in data. 

Thx!
--don

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the tfug mailing list