473,395 Members | 1,443 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,395 software developers and data experts.

Setting limits on size of result sets

Is it possible to set a per-user limit on the maximum number of rows
returned by a SELECT statement?

N. Shamsundar
University of Houston

Nov 12 '05 #1
4 3585
"N. Shamsundar" <sh******************@nospam.xyz> wrote in message
news:c4***********@masala.cc.uh.edu...
Is it possible to set a per-user limit on the maximum number of rows
returned by a SELECT statement?

N. Shamsundar
University of Houston

Fetch first n rows only.

You can download the SQL Reference at the IBM website.
Nov 12 '05 #2
Sorry, I should have made myself more clear. I want the database to
enforce of limit of m rows. If a user asks for "fetch first n rows", and
n <= m, or the table has <= m rows, the query should return min(n,m)
rows. Otherwise, an error message would be issued. I am, perhaps,
looking for a configuration parameter that the DBA can set.

N. Shamsundar
University of Houston

Mark A wrote:
"N. Shamsundar" <sh******************@nospam.xyz> wrote in message
news:c4***********@masala.cc.uh.edu...
Is it possible to set a per-user limit on the maximum number of rows
returned by a SELECT statement?

N. Shamsundar
University of Houston


Fetch first n rows only.

You can download the SQL Reference at the IBM website.


Nov 12 '05 #3
You could do this using DB2 Query Patroller with its "save" result sets
function.

N. Shamsundar wrote:
Sorry, I should have made myself more clear. I want the database to
enforce of limit of m rows. If a user asks for "fetch first n rows", and
n <= m, or the table has <= m rows, the query should return min(n,m)
rows. Otherwise, an error message would be issued. I am, perhaps,
looking for a configuration parameter that the DBA can set.

N. Shamsundar
University of Houston

Mark A wrote:
"N. Shamsundar" <sh******************@nospam.xyz> wrote in message
news:c4***********@masala.cc.uh.edu...
Is it possible to set a per-user limit on the maximum number of rows
returned by a SELECT statement?

N. Shamsundar
University of Houston


Fetch first n rows only.

You can download the SQL Reference at the IBM website.


Nov 12 '05 #4
> > Sorry, I should have made myself more clear. I want the database to
enforce of limit of m rows. If a user asks for "fetch first n rows", and
n <= m, or the table has <= m rows, the query should return min(n,m)
rows. Otherwise, an error message would be issued. I am, perhaps,
looking for a configuration parameter that the DBA can set.

N. Shamsundar
University of Houston

Check out the Governor Tool as described in the "Administration Guide:
Performance."
Nov 12 '05 #5

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

Similar topics

0
by: Randall Sell | last post by:
Hello all, I am migrating a Paradox application to SQL Server. My problem is that the existing Paradox table structure is limited. Correcting it will mean a re-write of the application (Delphi...
1
by: Erik Hendrix | last post by:
Hi, I have a question here regarding setting the prefetch size. So far we took the rule that for OLTP, prefetchsize = extent size and for DSS prefetchsize = extent size * number. However,...
37
by: Carol Depore | last post by:
How do I determine the maximum array size? For example, int a works, but a does not (run time error). Thank you.
4
by: UJ | last post by:
I have a page where the user can upload a video file. As you can guess, this may take a while. Is there a way I can change the session timeout for just this one page? I would also want to change...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
4
by: RainX | last post by:
Hi all, I'm new to the site and i was hoping someone here could help me out I was giving the following code and asked to determine whether the results giving any values for n1 and n2 (including...
4
by: SevDer | last post by:
Hi, I've done some coding in my web application however right now for an unknown reason my asp.net 2.0 site is not setting asp.net_sessionid cookie and as a result, I am losing the session data...
2
by: moonrox | last post by:
Thanks for you help in advance. I am trying to use sp_helpdb to get the size of all the databases on a sql server. The results of sp_helpdb (when using the @dbname='databasename') is 2 sets of...
7
by: copx | last post by:
Do the standards say anything about size limits for string literals (min size, max size)? I want to know this to make sure that my code is portable. The program in question is ANSI C89, but I would...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.