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 266411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T23:26:34+00:00 2026-05-11T23:26:34+00:00

is it possible to retrieve statistics about the minimal or maximal value of a

  • 0

is it possible to retrieve statistics about the minimal or maximal value of a numeric column in Oracle 10g? I have found the table USER_TAB_COL_STATISTICS having a LOW_VALUE and HIGH_VALUE column, but I am not sure whether those are the values I am looking for.

I need to find an efficient way to ask the DBS for those statistics. Using a regular MIN(a) and MAX(a) query would be too slow on large tables.

Thanks in advance.

  • 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-05-11T23:26:34+00:00Added an answer on May 11, 2026 at 11:26 pm

    Yes, LOW_VALUE and HIGH_VALUE will tell you the minimum and maximum values in the column but:

    • they are stored as RAW(32) columns, so the meaning will not be immediately apparent
    • they will be as of the last time statistics were gathered for the table, so may not be accurate (unless you explicitly gather stats before using them)

    If you index the column then MIN(a) and MAX(a) should be very fast as in this example where T1 has 50000 rows and is indexed on OBJECT_ID:

    SQL> select min(object_id) from t1;
    
    MIN(OBJECT_ID)
    --------------
               100
    
    ------------------------------------------------------------------------------------
    | Id  | Operation                  | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
    ------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT           |       |     1 |     5 |     2   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE            |       |     1 |     5 |            |          |
    |   2 |   INDEX FULL SCAN (MIN/MAX)| T1_ID | 53191 |   259K|     2   (0)| 00:00:01 |
    ------------------------------------------------------------------------------------
    
    Statistics
    ----------------------------------------------------------
              1  recursive calls
              0  db block gets
              2  consistent gets
              0  physical reads
              0  redo size
            419  bytes sent via SQL*Net to client
            380  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    

    The result is the same if you select the MAX instead of the MIN. However, if you select the MIN and MAX in a single select statement the result is different:

    SQL> select min(object_id), max(object_id) from t1;
    
    MIN(OBJECT_ID) MAX(OBJECT_ID)
    -------------- --------------
               100          72809
    
    
    -------------------------------------------------------------------------------
    | Id  | Operation             | Name  | Rows  | Bytes | Cost (%CPU)| Time     |
    -------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT      |       |     1 |     5 |    34   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE       |       |     1 |     5 |            |          |
    |   2 |   INDEX FAST FULL SCAN| T1_ID | 53191 |   259K|    34   (0)| 00:00:01 |
    -------------------------------------------------------------------------------
    
    
    Statistics
    ----------------------------------------------------------
              0  recursive calls
              0  db block gets
            125  consistent gets
              0  physical reads
              0  redo size
            486  bytes sent via SQL*Net to client
            380  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    

    This suggests that it may be better to get them separately, though I haven’t conclusively proved that.

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

Sidebar

Related Questions

Possible Duplicate: Retrieve column names from java.sql.ResultSet I have query which returns the result
Possible Duplicate: Retrieve Table Row Index of Current Row <html> <script> function addValue(a) {
Is it possible to retrieve the infomation about the webpage that sent a form
Is it possible to retrieve all the static objects which have been created in
Is it possible to retrieve from inside a given method any information about the
Isn't possible to retrieve auto lock value? Or anyone know how to modify the
is it possible to retrieve the username of a google account that i have
Is it possible to retrieve information about images on a web site without having
Is it possible to retrieve the value of a POST parameter from a NSURLRequest
Is it possible to retrieve the frame a UIView will have in landscape mode,

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.