[PHP] Re: query caching caching in general

2003-01-23 Thread Jean-Christian Imbeault
Justin French wrote:


anyone got any links to decent tutorials on sql caching, and caching in
general?


A few questions:

At what level do you want the caching?
Are you talking about stored procedures?
Do you mean storing functions in the DB? (some DB's, like PostgreSQL can 
compile functions once and reuse the compiled function).

Let me know where you want the caching to be and maybe I have a link or two.

Jc


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: query caching caching in general

2003-01-23 Thread Peter Janett
Query caching is something that seems to exist in Cold Fusion, but not PHP.

What I'm referring to is that in Cold Fusion you can specify that query
results be cached in memory, and how long to cache those results.  So, if
you have a page that runs the same query each time it's loaded, and you
cache a query on that page, then the results of that query are in memory, so
the call to the database is not run, instead the results from memory are
used, which can represent a HUGE speed increase.

To be totally repetitive, I'm not talking about a database cacheing results
of a query, but PHP caching the results of the query, instead of querying
the database.

I don't think it's possible to do anything like this in PHP, because of the
multiple database support, different function calls for different databases,
etc.

I've looked around, and found some PHP code that saves results sets in tmp
files, but I'm guessing that having the results cached in memory would be
faster than in files.

I think maybe the file caching was part of a database abstraction layer.

HTH,

Peter Janett

New Media One Web Services

New Upgrades Are Now Live!!!
Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1
Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25,
Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43

PostgreSQL coming soon!

http://www.newmediaone.net
[EMAIL PROTECTED]
(303)828-9882


- Original Message -
From: Jean-Christian Imbeault [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 23, 2003 1:20 AM
Subject: [PHP] Re: query caching  caching in general


 Justin French wrote:
 
  anyone got any links to decent tutorials on sql caching, and caching in
  general?

 A few questions:

 At what level do you want the caching?
 Are you talking about stored procedures?
 Do you mean storing functions in the DB? (some DB's, like PostgreSQL can
 compile functions once and reuse the compiled function).

 Let me know where you want the caching to be and maybe I have a link or
two.

 Jc


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: query caching caching in general

2003-01-23 Thread Clarkson, Nick

I found this on Zend - SQL Query Caching -
http://www.zend.com/zend/tut/tutorial-staub2.php;

The basics to caching is using the serialize() and unserialize() PHP
functions...

I don't know if this will help.

Nick




-Original Message-
From: Peter Janett [mailto:[EMAIL PROTECTED]]
Sent: 23 January 2003 08:41
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: query caching  caching in general


Query caching is something that seems to exist in Cold Fusion, but not PHP.

What I'm referring to is that in Cold Fusion you can specify that query
results be cached in memory, and how long to cache those results.  So, if
you have a page that runs the same query each time it's loaded, and you
cache a query on that page, then the results of that query are in memory, so
the call to the database is not run, instead the results from memory are
used, which can represent a HUGE speed increase.

To be totally repetitive, I'm not talking about a database cacheing results
of a query, but PHP caching the results of the query, instead of querying
the database.

I don't think it's possible to do anything like this in PHP, because of the
multiple database support, different function calls for different databases,
etc.

I've looked around, and found some PHP code that saves results sets in tmp
files, but I'm guessing that having the results cached in memory would be
faster than in files.

I think maybe the file caching was part of a database abstraction layer.

HTH,

Peter Janett

New Media One Web Services

New Upgrades Are Now Live!!!
Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1
Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25,
Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43

PostgreSQL coming soon!

http://www.newmediaone.net
[EMAIL PROTECTED]
(303)828-9882


- Original Message -
From: Jean-Christian Imbeault [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 23, 2003 1:20 AM
Subject: [PHP] Re: query caching  caching in general


 Justin French wrote:
 
  anyone got any links to decent tutorials on sql caching, and caching in
  general?

 A few questions:

 At what level do you want the caching?
 Are you talking about stored procedures?
 Do you mean storing functions in the DB? (some DB's, like PostgreSQL can
 compile functions once and reuse the compiled function).

 Let me know where you want the caching to be and maybe I have a link or
two.

 Jc


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


This private and confidential e-mail has been sent to you by Egg.
The Egg group of companies includes Egg Banking plc
(registered no. 2999842), Egg Financial Products Ltd (registered
no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
carries out investment business on behalf of Egg and is regulated
by the Financial Services Authority.  
Registered in England and Wales. Registered offices: 1 Waterhouse Square,
138-142 Holborn, London EC1N 2NA.
If you are not the intended recipient of this e-mail and have
received it in error, please notify the sender by replying with
'received in error' as the subject and then delete it from your
mailbox.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php