473,511 Members | 16,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Store db resultset in a session?

Hi,

I have a web application where there are a number of columns a user can
sort on (price, item etc). The database itself is HUGE (around 6 million
rows) and even with all the indexing it slows down a bit if too many
users start browsing. To be able to sort on a column, the webpage
reloads and does a requery ORDERing on that particular column. How can I
speed this up? Can I store a wholre resultset in a session variable? I
tried doing this but it won't work. Any tip would be appreciated. Thanks,
Steve

Jul 17 '05 #1
6 2383
Steve <nospam@nopes> wrote in news:40********@clarion.carno.net.au:
Hi,

I have a web application where there are a number of columns a user can
sort on (price, item etc). The database itself is HUGE (around 6 million
rows) and even with all the indexing it slows down a bit if too many
users start browsing. To be able to sort on a column, the webpage
reloads and does a requery ORDERing on that particular column. How can I
speed this up? Can I store a wholre resultset in a session variable? I
tried doing this but it won't work. Any tip would be appreciated. Thanks,


Do you have a separate index for each field that people are likely to want
to sort on?
Jul 17 '05 #2
Hi Steve,

On Mon, 08 Mar 2004 12:38:13 +1100, Steve <nospam@nopes> wrote:
Hi,

I have a web application where there are a number of columns a user can
sort on (price, item etc). The database itself is HUGE (around 6 million
rows) and even with all the indexing it slows down a bit if too many
users start browsing. To be able to sort on a column, the webpage
reloads and does a requery ORDERing on that particular column. How can I
speed this up? Can I store a wholre resultset in a session variable? I
tried doing this but it won't work. Any tip would be appreciated. Thanks,


I think you need a good categorisation for your resultset, as it seems
it returns quite a number of rows. I don't know what this is for, so I
cannot recommend any categories. With good categories you will have
selective Indizes, which will be speedy.

Maybe you can post your data model.

HTH, Jochen
--
Jochen Daum - Cabletalk Group Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 17 '05 #3


Eric Bohlman wrote:
Steve <nospam@nopes> wrote in news:40********@clarion.carno.net.au:

Hi,

I have a web application where there are a number of columns a user can
sort on (price, item etc). The database itself is HUGE (around 6 million
rows) and even with all the indexing it slows down a bit if too many
users start browsing. To be able to sort on a column, the webpage
reloads and does a requery ORDERing on that particular column. How can I
speed this up? Can I store a wholre resultset in a session variable? I
tried doing this but it won't work. Any tip would be appreciated. Thanks,

Do you have a separate index for each field that people are likely to want
to sort on?


Yes I do. Almost every single field! And the combination can be very
very bizarre. People can select different shops etc and different price
ranges and this gets pretty complicated at times - not to mention slow.

Steve

Jul 17 '05 #4


Jochen Daum wrote:
Hi Steve,

On Mon, 08 Mar 2004 12:38:13 +1100, Steve <nospam@nopes> wrote:

Hi,

I have a web application where there are a number of columns a user can
sort on (price, item etc). The database itself is HUGE (around 6 million
rows) and even with all the indexing it slows down a bit if too many
users start browsing. To be able to sort on a column, the webpage
reloads and does a requery ORDERing on that particular column. How can I
speed this up? Can I store a wholre resultset in a session variable? I
tried doing this but it won't work. Any tip would be appreciated. Thanks,

I think you need a good categorisation for your resultset, as it seems
it returns quite a number of rows. I don't know what this is for, so I
cannot recommend any categories. With good categories you will have
selective Indizes, which will be speedy.

Maybe you can post your data model.

HTH, Jochen


The problem is that is more of an 'admin' utility than a user-based
tool. We like to monitor on almost every parameter there is and people
can search on anything they want. There are a set of advanced filters
that can be applied and so there's no telling what the user might
filter/search on. Besides, the thing can't be split up into categories
more than it already has :( Is there no other way?
Cheers,
Steve

Jul 17 '05 #5
Are you using TOP or LIMIT in your SQL statement? You don't want your
database server to sort stuff that isn't going to be displayed anyway,
assuming that you're not showing all 6 million in a single page.

Uzytkownik "Steve" <nospam@nopes> napisal w wiadomosci
news:40********@clarion.carno.net.au...
Hi,

I have a web application where there are a number of columns a user can
sort on (price, item etc). The database itself is HUGE (around 6 million
rows) and even with all the indexing it slows down a bit if too many
users start browsing. To be able to sort on a column, the webpage
reloads and does a requery ORDERing on that particular column. How can I
speed this up? Can I store a wholre resultset in a session variable? I
tried doing this but it won't work. Any tip would be appreciated. Thanks,
Steve

Jul 17 '05 #6
Hi,

On Mon, 08 Mar 2004 16:03:06 +1100, Steve <nospam@nopes> wrote:


Jochen Daum wrote:
Hi Steve,

On Mon, 08 Mar 2004 12:38:13 +1100, Steve <nospam@nopes> wrote:

Hi,

I have a web application where there are a number of columns a user can
sort on (price, item etc). The database itself is HUGE (around 6 million
rows) and even with all the indexing it slows down a bit if too many
users start browsing. To be able to sort on a column, the webpage
reloads and does a requery ORDERing on that particular column. How can I
speed this up? Can I store a wholre resultset in a session variable? I
tried doing this but it won't work. Any tip would be appreciated. Thanks,

I think you need a good categorisation for your resultset, as it seems
it returns quite a number of rows. I don't know what this is for, so I
cannot recommend any categories. With good categories you will have
selective Indizes, which will be speedy.

Maybe you can post your data model.

HTH, Jochen


The problem is that is more of an 'admin' utility than a user-based
tool. We like to monitor on almost every parameter there is and people
can search on anything they want. There are a set of advanced filters
that can be applied and so there's no telling what the user might
filter/search on. Besides, the thing can't be split up into categories
more than it already has :( Is there no other way?


There are typically columns, which have a fixed set of values. These
should be indexed and incorporated into the filters. Its typically
good to use unique indexes, because they can be used in a merge or
hash join.

Also, try to use like 'text%' instead of like '%text%' if possible.

Indexes on date ranges also work well.

Maybe also your data model could be more normalized.

Maybe you want to post your data model...

HTH, Jochen


Cheers,
Steve


--
Jochen Daum - Cabletalk Group Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3634
by: RoyalScorpion | last post by:
hi guys, i get an updatable resultset from a connection then used it to insert a new row but the result set doesn't chane after insertion, i mean the no of rows before insertion is the same after...
11
2508
by: Colin Steadman | last post by:
Hope this makes sense! I'm building an ASP page which allows uses to add items to an invoice via a form, ie: Item No Part No Order No Quanity Units Price VAT ------- ...
0
1315
by: Michael O'Brien | last post by:
I'm trying to hook in a specialized state store server into ASP.NET. I understand I can create a HttpModule and hook the events OnAcquireState and OnReleaseState. So far so good. But, it seems...
4
2933
by: Paul W | last post by:
Hi - I don't want to rely on my users having cookies enabled. If I use Cookieless=True it of course mangles the urls which means there is no browser caching of the pages, so it is slow. ...
4
4428
by: _link98 | last post by:
Problem: java ResultSet cursor from SQL/PL stored-procedure is FORWARD_ONLY. Is it possible to have ResultSet cursors from SQL/PL procedures to scroll forward and backwards? Perhaps I am missing...
12
2162
by: robertino | last post by:
Hi all, I've put together a few SPs to produce a BOM (bill of materials) listing, which together use a couple of global temp tables, and return the results from a cursor. Here's the code: ...
3
2057
by: alpareshamwala | last post by:
i am using vectors to store data from resultset but facing problems can anyone give me sample code for the same Alpa
8
3357
by: pim | last post by:
Dear All, What I was wondering is how safe it is to store user_id or username or anything like that in session. I usualy store a bunch of info in a session so I do not need to search the...
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7138
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7355
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7423
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7510
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5668
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.