Informix

Informix

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  Is there an easier way to tell if a table was built "with rowid"?

    Posted 26 days ago

    For various reasons, mainly the need to partition some tables, we will need toalter fragment .. with rowid for some tables.  But to avoid redundancy (and maybe upsetting an existing pseudo-rowid) I need to determine which tables in a database already have "with rowid".  I know from elsewhere that when a partitioned table is "with rowid" it has an index named "system-rowid".  (That's a dash, not an underscore.), hence, this query works toward that goal:

    select tabname[1,20],
           partition[1,10],
           fragtype,
         --t.tabid,
           indexname[1,20]
      from sysfragments f, systables t
     where t.tabid = f.tabid
       and indexname like "%rowid"
     order by tabname, partition
    ;

    But I was hoping for a simpler, more direct query, like a flag in systables on systabinfo.

    I will be posting a separate question of "with rowid", hopefully to remain theoretical.

    Ideas, anyone?



    ------------------------------
    +-----------------------------------------------------------+
    | I am pleased to report that I had no problems today. |
    | I had only issues, opportunities, challenges and valuable |
    | learning experiences. |
    +------------------------------------------ Jacob S --------+
    ------------------------------


  • 2.  RE: Is there an easier way to tell if a table was built "with rowid"?

    Posted 26 days ago

    Running the following against systables will tell you if the table has been created with rowids:

    select tabname
    from systables
    where sysmaster:bitval(flags, 1) = 1



    ------------------------------
    Mike Walker
    xDB Systems, Inc
    www.xdbsystems.com
    ------------------------------



  • 3.  RE: Is there an easier way to tell if a table was built "with rowid"?

    Posted 25 days ago

    Perfect, Mike.

    Thanks!



    ------------------------------
    +-----------------------------------------------------------+
    | I am pleased to report that I had no problems today. |
    | I had only issues, opportunities, challenges and valuable |
    | learning experiences. |
    +------------------------------------------ Jacob S --------+
    ------------------------------