473,398 Members | 2,812 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,398 software developers and data experts.

Facing Problem while querying larger tables

Hi,
I am facing a problem regarding querying thru a large table having millions of rows.......
Its hanging in between while querying for all those rows

Can anybody suggest me a query regarding :
Querying the database everytime for next 100 records ( that means i need to set up a cursor) till the count of the table rows ends up(take 1 million rows e.g.)

The database is DB2
Dec 3 '07 #1
2 1727
mwasif
802 Expert 512MB
Moved to DB2 Forum.
Dec 4 '07 #2
docdiesel
297 Expert 100+
Hi,
I am facing a problem regarding querying thru a large table having millions of rows....... Its hanging in between while querying for all those rows
Millions of rows isn't the problem. If it's hanging in between, there may be some (dead) lock. Or it's just needing very much time because of a) missing or inusable indexes or b) a too small bufferpool. And needing too much time often results in locks.

a) Ty to create an index on the fields which are used in the where clauses, join conditions etc.
b) If there's an index, do a runstats. Maybe even e reorg is necessary.
c) Increase the size of the bufferpool.

Can anybody suggest me a query regarding :
Querying the database everytime for next 100 records ( that means i need to set up a cursor) till the count of the table rows ends up(take 1 million rows e.g.)
Use "select ... from ... where ... fetch first 100 rows only". Unfortunately there's no "skip first x rows", so you have to add something like "where prim_key_row_id > pagecounter * 100".

Regards,

Bernd
Dec 5 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: larry | last post by:
Ok I am working on building my skills to convert my apps to LAMP (read I'm a semi noob), and there was one part I was thinking of. If I create two identical MySQL tables (we'll say, invoice and...
6
by: Greg | last post by:
I am working on a project that will have about 500,000 records in an XML document. This document will need to be queried with XPath, and records will need to be updated. I was thinking about...
0
by: Chris | last post by:
Hi all, I have a web site which allows our customers to write data via forms into an access table stored on our ISP's remote server. My question is how do I efficiently retrieve the data? ISP...
5
by: Shane | last post by:
I wonder if someone has any ideas about the following. I am currently producing some reports for a manufacturing company who work with metal. A finished part can contain multiple sub-parts to...
0
by: roiavidan | last post by:
Hi, I'm having a bit of a problem with a small application I wrote in C#, which uses an Access database (mdb file) for storing financial data. After looking for a similiar topic and failing to...
2
by: commanderjason | last post by:
This seems like a very simple question but i have never been able to find an easy answer to it. I have a user table and i do a join with another table, we'll call the other table a results...
5
by: sql_er | last post by:
Guys, I have an XML file which is 233MB in size. It was created by loading 6 tables from an sql server database into a dataset object and then writing out the contents from this dataset into an...
8
by: voger | last post by:
Hi everyone Can anyone please explain this strange behavior? I have this function that is supposed to copy the contents of one array to one other array, but sorted. I don't know if the logic...
4
by: =?Utf-8?B?U3VoYXMgVmVuZ2lsYXQ=?= | last post by:
Hello, I am facing an issue while querying Active directory using C# code with system.DirectoryServices namespace. Here is the path for my LDAP - "LDAP://CN=XY - C++/Unix and other,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
0
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.