473,671 Members | 2,426 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 2393
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
3641
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 insertion and also the data, this is the code prove what i say int currentRow = resultset.getRow(); display(resultset); resultset.moveToInsertRow(); for (int i = 0; i < fields.size(); i++) {
11
2531
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 ------- ------- -------- ------- ----- ----- --- .... ... ... ... ... ... ... <Add item> <Submit>
0
1318
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 that the framework owns the HttpSessionState instance (HttpContext.Session) and so my state store module must use the Add, Remove and Clear methods to interact with the store. ie. on Acquire, I need to call HttpSessionState.Add to add all the...
4
2943
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. What are the other options to use to be able to store a small amount of session data? I know it can be done because, for example, www.discountasp.net's site doesn't use cookies or cookie-munging, but it
4
4445
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 something. Environment: client UDB 8.1 FP9a on Win32, server UDB 8.1 FP9a on Solaris 8 (64BIT). The JDK version on the WinXP client is
12
2184
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: -- Initialize the temp tables............ create procedure myschema.init_ebom_tables ( ) language sql
3
2079
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
3368
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 database all the time. However, is it easy to change a value after being logged in? For example: - A user logs in - Now set is: $_SESSION = 34;
0
8481
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8823
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8672
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7441
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5702
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4227
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2817
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1814
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.