[Chicago-talk] Design Question
jt at plainblack.com
Mon May 9 13:45:12 PDT 2005
Let me add one more:
And IF you don't have 999,999,999,999,999,999,999,999 records in the table you're
polling. Cuz then your index will still be absolutely enormous even though the index
values are relatively small.
On Mon, 09 May 2005 15:35:47 -0500
Jay Strauss <me at heyjay.com> wrote:
> 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.
> Chicago-talk mailing list
> Chicago-talk at pm.org
JT ~ Plain Black
ph: 703-286-2525 ext. 810
Create like a god, command like a king, work like a slave.
More information about the Chicago-talk