[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference ulysse::rdb_vms_competition

Title:DEC Rdb against the World
Moderator:HERON::GODFRIND
Created:Fri Jun 12 1987
Last Modified:Thu Feb 23 1995
Last Successful Update:Fri Jun 06 1997
Number of topics:1348
Total number of notes:5438

764.0. "Cardinality/Distribution lists" by DEMOAX::LOEW () Fri Oct 12 1990 18:44

    
    
    INGRES has the ability for the application programmer to retrieve
    information from distribution/cardinality lists.  The benefit being
    that this can give an indication of how big a query may be and allow
    the programmer to put some conditions in before the fact of an actual
    query.  Do we have this capability in RDB???
    
    Thank You,
    
    Jerry
    
T.RTitleUserPersonal
Name
DateLines
764.1GNPIKE::GUAYWed Oct 17 1990 21:3820

Hi Jerry,

RDB$CARDINALITY in the RDB$RELATIONS table contains the cardinality information
for the table in RDB.  For more information, see the RDO and RMU reference
manual part 1, section 7.9

As an aside, my understanding is that the statistics that I think you are 
talking about with ingres are only updated when an optimizedb is run.  So
if you don't update your database very often by running optimizedb, 
the statistics would be stale.


hope this helps,

todd


(what kinds of conditions are you trying to do with the cardinality info?)
764.2Query the system tablesTRCO01::MCMULLENKen McMullenThu Oct 18 1990 14:457
    Jerry,
    
    Don't forget you can query RDB's systems tables in the same fashion
    that you can query the data tables. This means you can query the
    cardinality fields for each relation.