Re: [PHP] Question on data loading

2004-03-08 Thread Jason Davidson
I think your best bet is to only show product titles, and possibly a bit
of the summary or something in the catalogue, then have the user click
the product to view full information on it. 
this takes 2 db calls, one to load the limited info of all products, and
one to load all info on one product.  

I think if you get into servlets and such, your going to run up other
resource problems for the sake of saving very little.

Jason

marc serra [EMAIL PROTECTED] wrote:
 
 Hi,
 
  
 
 I'm currently designing a website with a catalogue containing lots of
 products (more than 1000).
 
 To reduce response time to database, I want to know if there is a solution
 like loading all objects in memory for all users like a servlet could do in
 java and after giving to each people connected to website a way of accessing
 this shared memory ?
 
  
 
 I'm interested in any solution, 
 
  
 
 thx
 
  
 
 Marc.
 
 

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



Re: [PHP] Question on data loading

2004-03-08 Thread Miles Thompson
It's the old story 

Normalize your tables
Use indexes on commonly called fields
Fetch items only as needed, within reason.
Remember that the web is stateless, so when you zero in for more data you 
will be refreshing the page from the server.

One thousand items is very few for a database, try humdreds of thousands or 
millions.

Regards - Miles

At 10:14 PM 3/8/2004 +0100, marc serra wrote:
Hi,



I'm currently designing a website with a catalogue containing lots of
products (more than 1000).
To reduce response time to database, I want to know if there is a solution
like loading all objects in memory for all users like a servlet could do in
java and after giving to each people connected to website a way of accessing
this shared memory ?


I'm interested in any solution,



thx



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