[Chicago-talk] Design Question
Jay Strauss
me at heyjay.com
Mon May 9 13:35:47 PDT 2005
Richard,
Polling your database, should be relatively inexpensive,
IF (I stress if):
1) you have an index on some value that lets the DB look it up easily.
Ideally you'd have a column with a (Y or <NULL>) value in it, indicating
that this is a NEW phone number. When you're done processing this
record, you set the value to NULL. This way your index is very small,
only containing the new record.
2) you are using a "bind" variable in your DBI (I hope you are using
DBI). That way the DB isn't reprocessing your SQL over and over and over.
Most RDBMSs (I don't remember which you are using), have a cache, where
they store recently read data, so that subsequent reads of the same data
are faster. In your case, you can make it so that your polling activity
is pretty lightweight. And you could avoid building a
posting/subscription/broadcast thing others had suggested.
Thanks
Jay
More information about the Chicago-talk
mailing list