views:

43

answers:

1

Hi,
Im developing site for a travel site, in the process when a user searches I do manipulation on the database result then store it in session. Which stores the data in the ci_session database. By following this method I'm able to easily filter the data from

$this->session->userdata();

A normal search which results in 4 hotels the session data goes more than 20kb, in actual server environment it is possible that the result will be more than 200 hotels, i.e. 4000kb data for a single user on each row, in ci_session table.

this process is making the app very slow, What other approach i can follow to make the search result much faster.

A: 

You can store the session data in your database. CI Sessions have the ability to handle that. No need to do it yourself.

Read the chapter in the manual how to configure it properly. Choose wisely what you write into the "session" since lots of sessiondata in the database could make the requests slow if you need them on every site.

DrColossos
yes I'm following CI_session table, but my search is being too slow.
m4k