Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8113299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:46:56+00:00 2026-06-06T02:46:56+00:00

I try to limit resultset in size without having to change each SQL statement

  • 0

I try to limit resultset in size without having to change each SQL statement from the app (at least for instance). So adding ROWNUM clause to every query is not an option.

I’m looking more or less for some global parameter, or at least a session parameter (like SET ROWCOUNT in SQLServer).

The app uses JDBC ressource pool to connect to Oracle, so I can set session-wide parameter in SQL init JDBC pool.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T02:46:58+00:00Added an answer on June 6, 2026 at 2:46 am

    Have you tried using the Statement.setMaxRows method? That’s a standard JDBC approach that will silently drop rows after the specified maximum number have been fetched.

    From a performance standpoint, however, you are likely better served by actually modifying the queries that are sent to the database. If you do as @MK suggests, you’ll be telling the optimizer that you’re only going to fetch N rows. That potentially allows the optimizer to pick a more efficient plan.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, I'm working from this example BONECP : package javasampleapps; import java.sql.Connection; import java.sql.ResultSet;
substring complains when I try to limit a string to 10 characters which is
I keep hearing that Android applications should try to limit the number of objects
First off, here's my SQL query: SELECT research_cost, tech_name, (SELECT research_cost FROM technologies WHERE
I working on app what should get list of users from db and update
I’m having a bit of trouble controlling the results from a data generating algorithm
I have table of user actions, each having a user associated, a type, and
i'm try to get results from freebase using mql, for example: http://api.freebase.com/api/service/mqlread?query= {query:{name~=:Barack,name:null,type:[],limit:1}} And
I am having a confusing issue -- for me at least, this may be
i ave been having trouble with a simple select sql query. using php PDO.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.