This is a discussion on SERIAL8 on a Fragmented Table within the Informix forums, part of the Database Server Software category; --> Here are my software versions: AIX 5.1.0 Informix Dynamic Server 2000 Version 9.21.UC4 I have a table that is ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Here are my software versions: AIX 5.1.0 Informix Dynamic Server 2000 Version 9.21.UC4 I have a table that is fragmented round robin over 10 dbspaces. It currently stores over 1.2 billion rows and is expected to grow, hence the reason to use the SERIAL8 data type for my SERIAL column. When I do an insert into the table I expect the serial8 value to increment by one - this is what it says in the manuals. What I am seeing is that the SERIAL8 column is incrementing by the number of dbspaces defined for fragmentation. (i.e. 1, 11, 21, 31, 41...) I have tried this with 2, 4 ,5 and 10 fragments and it DEFINITELY follows this pattern. Is there anything special I need to know for using the SERIAL8 data type on a fragmented table or is this the way it is supposed to be working? Thanks for any insight. -- Chris |
| |||
| Do you have CDR_SERIAL set? "Chris S" <cjsommer@gmail.com> wrote in message news:1123009030.584478.181860@g47g2000cwa.googlegr oups.com... > Here are my software versions: > > AIX 5.1.0 > Informix Dynamic Server 2000 Version 9.21.UC4 > > I have a table that is fragmented round robin over 10 dbspaces. It > currently stores over 1.2 billion rows and is expected to grow, hence > the reason to use the SERIAL8 data type for my SERIAL column. When I > do an insert into the table I expect the serial8 value to increment by > one - this is what it says in the manuals. What I am seeing is that > the SERIAL8 column is incrementing by the number of dbspaces defined > for fragmentation. > > (i.e. 1, 11, 21, 31, 41...) > > I have tried this with 2, 4 ,5 and 10 fragments and it DEFINITELY > follows this pattern. Is there anything special I need to know for > using the SERIAL8 data type on a fragmented table or is this the way it > is supposed to be working? > > Thanks for any insight. > > -- > Chris > |
| |||
| No, I checked the ONCONFIG file and CDR_SERIAL is not set. From what I have read CDR_SERIAL is only used for enterprise replication. I did just find the following link though. It may have something to do with what I'm seeing but I'm not sure. I think a serial8 incrementing by 10 will keep me busy for about 130 years, but I just want to understand what's going on. http://publib.boulder.ibm.com/infoce...oc/sqls303.htm At the very bottom it states: "You might notice a difference between serial-column values in fragmented and nonfragmented tables. The database server assigns serial values round-robin across fragments, so a fragment might contain values from noncontiguous ranges. For example, if there are two fragments, the first serial value is placed in the first fragment, the second serial value is placed in the second fragment, the third value is placed in the first fragment, and so on." |
| |||
| CDR_SERIAL will kick in for non-ER sites as well. Basically it makes the serial and serial-8 column function more like a sequence generator. M.P. "Chris S" <cjsommer@gmail.com> wrote in message news:1123011840.207629.302780@g44g2000cwa.googlegr oups.com... > No, I checked the ONCONFIG file and CDR_SERIAL is not set. From what I > have read CDR_SERIAL is only used for enterprise replication. > > I did just find the following link though. It may have something to do > with what I'm seeing but I'm not sure. I think a serial8 incrementing > by 10 will keep me busy for about 130 years, but I just want to > understand what's going on. > > http://publib.boulder.ibm.com/infoce...oc/sqls303.htm > > At the very bottom it states: "You might notice a difference between > serial-column values in fragmented and nonfragmented tables. The > database server assigns serial values round-robin across fragments, so > a fragment might contain values from noncontiguous ranges. For example, > if there are two fragments, the first serial value is placed in the > first fragment, the second serial value is placed in the second > fragment, the third value is placed in the first fragment, and so on." > |
| ||||
| I think I found my problem and it's not really a problem at all. Go figure. During my "testing" I was doing an "SQL> select first 100 * from testtable" and looking at the output of that. It must have just been grabbing data from only one of the fragments. When I add an order by SERIAL column it spits back the serial values incremented by one like I expected. Thanks for any responses. Live and learn I guess. -- Chris |