problem with sessions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
murthy
Forum Commoner
Posts: 50
Joined: Fri Aug 20, 2004 1:22 am
Location: India
Contact:

problem with sessions

Post by murthy »

Hi,

I am displaying 15,000 records in a single page by using sessions.
at the time of loading it is taking too much time nearly 10 min.

At the time loading i am trying to navigating other links in my site.those pages are also not loading....

i am thinking problems with sessions....

I AM waiting for your reply
Thanks
Murthy
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

are you storing all 15,0000 records in the session, if so you need to rethink you program as that is far to many for sessions to easily handle and IMHO an abuse of what sessions where designed for.

If you are storing all the records in the session then you need to just store the query, userId, something to reference that record set in the db. As well you will find it will be much faster to try and break that record set up into smaller chunks.
murthy
Forum Commoner
Posts: 50
Joined: Fri Aug 20, 2004 1:22 am
Location: India
Contact:

Post by murthy »

thanks .... for your response

I am storing only username and password in sessions ..... by using this i am fetching all records from the database.I am displaying all records in one page only.

Murthy
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

Post by phpScott »

whew!!!! i was scared there for a second. Unless you have a very strong need to return all the results on one page I would suggest using a form or [devnet]pagination[/devnet] or check out kettle_drums class at http://www.redvodkajelly.com/index.php?v=code/3 as it is quite good as well.
15000 records is a lot and that is why you page is slow to load.
Post Reply