473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to deal with big query result?

Greetings,

In my search application, user can type a number to search. I use LIKE in my
query.

If a query result generates over 10,000 recordsets, it may several minutes
to run.

Is there a way to only query certain recordset at a time?

I found in SQL you can use "TOP". Like select TOP 100.... it will return
only top 100 records.

Is there a way to query may be from 101 to 200 then from 201 to 300...

My query is like: Select * from Product where PartNumber like '%" PartNumber
"%'

Any idea is welcome.

Thanks a lot.

Lin Ma

Jul 19 '05 #1
2 2401
Yes Lin, this is called "paging"

http://www.aspfaq.com/2120
http://www.aspfaq.com/2352

The use of a temp table to divide all of the records tends to scare people.
Typically, much of the processing time is in transferring the data over the
network and rendering the HTML required to display the data, than the
initial filtering. So give that method a shot.

Also, if a query returns 10,000 rows, you might consider requiring that the
user narrow it down a bit better... e.g. picking categories, or only
choosing results that start with one letter at a time, or ...


"Lin Ma" <a@a.com> wrote in message
news:#S*************@TK2MSFTNGP10.phx.gbl...
Greetings,

In my search application, user can type a number to search. I use LIKE in my query.

If a query result generates over 10,000 recordsets, it may several minutes
to run.

Is there a way to only query certain recordset at a time?

I found in SQL you can use "TOP". Like select TOP 100.... it will return
only top 100 records.

Is there a way to query may be from 101 to 200 then from 201 to 300...

My query is like: Select * from Product where PartNumber like '%" PartNumber "%'

Any idea is welcome.

Thanks a lot.

Lin Ma


Jul 19 '05 #2
http://www.aspfaq.com/2120
http://www.aspfaq.com/2096

Ray at work

"Lin Ma" <a@a.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
Greetings,

In my search application, user can type a number to search. I use LIKE in my query.

If a query result generates over 10,000 recordsets, it may several minutes
to run.

Is there a way to only query certain recordset at a time?

I found in SQL you can use "TOP". Like select TOP 100.... it will return
only top 100 records.

Is there a way to query may be from 101 to 200 then from 201 to 300...

My query is like: Select * from Product where PartNumber like '%" PartNumber "%'

Any idea is welcome.

Thanks a lot.

Lin Ma


Jul 19 '05 #3

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

Similar topics

4
by: Wm | last post by:
I have a query that I expect to return 3 or 4 entries -- but I seem to be getting only the most recent entry, repeated 4 times. What am I doing wrong here? $query="SELECT...
0
by: Phil Powell | last post by:
I have a very simple mySqlQuery object that takes two parameters: 1) the string query 2) the db connection resource I tested and was certain everything is passing correctly (the string query...
1
by: Phil Powell | last post by:
Here is the scope of what I need to do; want: enrollment_year allowed (even if null) all of ica criteria:
2
by: jaysonsch | last post by:
Hello! I am having some problems with a database query that I am trying to do. I am trying to develop a way to search a database for an entry and then edit the existing values. Upon submit, the...
9
by: Wolfgang Kreuzer | last post by:
Try hard to become familiar with T-SQL. Can anybodey tell me the best way to deal with set's provided by a stored procedure. Til yesterday I thougt trapping set in temp table using INSERT EXEC...
1
by: muelli75 | last post by:
Hi! Im getting insane by solving a problem .... I try to define a function which uses a code-snippet from another file. My base are the codes from the great book "WebDataBase-Book by H....
3
by: cover | last post by:
I have a table with 50 fields that receive input depending on whether that input came in from a 'shaker' form or a 'conveyor' form. Input from the 'conveyor' form might populate 25 fields while...
24
by: clare at snyder.on.ca | last post by:
I have a SQL query I need to design to select name and email addresses for policies that are due and not renewed in a given time period. The problem is, the database keeps the information for every...
11
by: funky | last post by:
hello, I've got a big problem ad i'm not able to resolve it. We have a server running oracle 10g version 10.1.0. We usually use access as front end and connect database tables for data extraction....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.