Hi Todd,

The query produces a list of contacts that have characteristics specific to
that particular search screen, eg suppliers, and is used to populate a drop
down list. The query to populate the drop down list won't change during the
search, however the query that produces the search results will, for example
the user may select a different supplier from the search list or may narrow
the price range or some other search criteria that is on the search page.

Regards

Richard
 

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Todd Martin
Sent: 02 February 2010 21:10
To: [email protected]
Subject: Re: [phpug] PHP session variables vs database cache

Hi Richard


> I have a fairly complex query that runs against 3 MySQL tables to
> produce a list of contacts that are used to populate a select list.

> The select list may need to be rebuilt a number of times as the user
> refines their search. The query won't vary and the likelihood that the
> results will vary are low enough that saving the results in a session
> variable is acceptable. I'd expect that the user would peruse the
> results for 10 to 60 seconds before refining their search.

What do you mean, "the query won't vary?" Surely, everytime the user
refines the search, the query changes. Doesn't it?

> My question is: should I save the query results in a session variable
> for reuse or is the database efficient enough to cache the query results?
> 
>  
> 
> Thanks and regards
> 
>  
> 
> Richard
> 
> -- 
> NZ PHP Users Group: http://groups.google.com/group/nzphpug
> To post, send email to [email protected]
> To unsubscribe, send email to
> [email protected]
> 
> -- 
> NZ PHP Users Group: http://groups.google.com/group/nzphpug
> To post, send email to [email protected]
> To unsubscribe, send email to
> [email protected]

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to