Unix Technical Forum

SERIAL8 on a Fragmented Table

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 ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 09:55 AM
Chris S
 
Posts: n/a
Default SERIAL8 on a Fragmented Table

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 09:55 AM
Madison Pruet
 
Posts: n/a
Default Re: SERIAL8 on a Fragmented Table

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
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 09:55 AM
Chris S
 
Posts: n/a
Default Re: SERIAL8 on a Fragmented Table

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."

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-20-2008, 09:55 AM
Madison Pruet
 
Posts: n/a
Default Re: SERIAL8 on a Fragmented Table

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."
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-20-2008, 09:55 AM
Chris S
 
Posts: n/a
Default Re: SERIAL8 on a Fragmented Table

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:20 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com