Douglas Wilson wrote:
>
> From: "Mark Korey" <[EMAIL PROTECTED]>
> >
> > I have some data in Oracle which is virtually static (it rarely
> > changes).
> > And I have a CGI process which needs it. This process happens to only
> > need this data from the DB.
> > So I'm wondering if it will be faster if I cache this data to a flat
> > file & read
> > the flat file instead of connecting to Oracle (via DBI), fetching the
> > data, & dropping the DB connection.
>
> A flat file probably wouldn't be a good solution, because as already
> mentioned, you have to open it, parse it, etc.
> But a DB_File might be a good solution,

Just to give a counterpoint to Doug and Ilya's comments:

Given a web context and a small dataset without mod_perl or other
persistance scheme, the connection time when using an RDBMS will likely
be as slow as the opening/parsing time of the flatfile.  DB_file will
only be quicker if your search terms are contained in the key column of
the file and will be difficult to maintain/port because your queries
won't be SQL. Using DBD::CSV or DBD::AnyData you can stick with SQL,
have keys in any column and have 0 connection time.

--
Jeff
--- Begin Message ---
Douglas Wilson wrote:
> 
> From: "Mark Korey" <[EMAIL PROTECTED]>
> >
> > I have some data in Oracle which is virtually static (it rarely
> > changes).
> > And I have a CGI process which needs it. This process happens to only
> > need this data from the DB.
> > So I'm wondering if it will be faster if I cache this data to a flat
> > file & read
> > the flat file instead of connecting to Oracle (via DBI), fetching the
> > data, & dropping the DB connection.
> 
> A flat file probably wouldn't be a good solution, because as already
> mentioned, you have to open it, parse it, etc.
> But a DB_File might be a good solution,

Just to give a counterpoint to Doug and Ilya's comments:

Given a web context and a small dataset without mod_perl or other
persistance scheme, the connection time when using an RDBMS will likely
be as slow as the opening/parsing time of the flatfile.  DB_file will
only be quicker if your search terms are contained in the key column of
the file and will be difficult to maintain/port because your queries
won't be SQL. Using DBD::CSV or DBD::AnyData you can stick with SQL,
have keys in any column and have 0 connection time.

-- 
Jeff
--- End Message ---

Reply via email to