Florian Schmitz wrote: > > Hello, > > > i'm just thinking about different type of Primary Keys. We're actually > using randomly generated > UUIDs (GUIDs) for our "billons-of"-tables. They're stored in VARCHAR(50)- > Columns and hence tend to > bloat space-consumption. Further i'm *guessing* they're not quite well- > performing concerning > bulk-insert and large queries. > How appropriate do you consider DEFAULT SERIAL for such large tables > (containing, or going to > contain billions of records)? > Are they're any other viable possibility for automatic created primary > keys? > > Thanks alot. :-) > > Flo >
Did you think about our implicit primary key? If no user-defined primary key is given, we implicitly add a (hidden) column syskey char (8) byte, implicitly 'incremented' for each row, thus appending the newly inserted row to the far right end of the tree of rows in this table (as would be done with serial,too). And this behavior is better (performance) than receiving the next serial(sequence) value and inserting then. You can ask for this implicitly key with 'SELECT SYSKEY,<whatever_you_like>', but SYSKEY will not be part of 'SELECT *' Does this help? Elke SAP Labs Berlin > -- > > Florian Schmitz > > ______________________ > acardo technologies AG > Königswall 18a > 44137 Dortmund > > fon: +49 (0) 2 31 / 58 44 97 - 0 > fax: +49 (0) 2 31 / 58 44 97 - 21 > mail: [EMAIL PROTECTED] > web: www.acardo.com > > -- > MaxDB Discussion Mailing List > For list archives: http://lists.mysql.com/maxdb > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]