Re: <No Subject Supplied>
Posted in 1993
In article <1pqp7pINN86u@emory.mathcs.emory.edu> mark@cdin-1.compu.com (Mark Heringslake) writes: } Hello Fellow Netters..... } } I am running 4.10U2 version of Informix SE... } Good, don't upgrade to 5.00 just yet. There are problems with ROWID's which I'm guessing you use all over :-) } 1) I have a table that has a SERIAL field. For conversion purposes } I force inserted (via SQL) a row w/ a value of -1 (which I use for } any record that doesn't convert right). It took it and I can view } the data via SQL, but none of the other programs seem to "see" } this record. NOTE: This is NOT a problem, just curious as to why } it seems to be invisible. } } a) Is this an unusual situation ? } Very unusual... a SERIAL field should have a unique index on it. The fact that you can insert multiple -1's tells me that something is amiss. } b) Could this cause a problem in the future ? } Probably not. } c) Somewhat unrelated..... } How do I get the "serial" value to start over - do I have to } alter the table to remove the "serial" field and then alter it } again back to "serial"? } The serial value is stored in the .idx file for a table. The only way I can think of getting a serial field to start over is to enter 2,147,483,647 records or drop/re-create the table. } 2) I have a table that had a number of records, but now they're all } deleted. } } a) Why does it still take up space as if there were records in it? } Because the records were marked as deleted, not physically deleted. You'll notice that if you start adding new records, the file won't start growing until all of the holes left by the delete are filled in. } b) Is there a way to "compress" it w/o dropping and recreating? } You could alter ONE of the indexes (preferably the most used one), to CLUSTER. Keep in mind though that you as the programmer see an index being altered... the engine will copy the data to a new table, drop the old table, and rename the new table. } c) Is there any performance degradation when records get re-added? } If I drop/recreate the index, will that prevent degradation? } No. No. } d) Is there some other way to get rid of all the records OTHER } THAN delete or drop? } Not that I know of... if someone else has a way, please let me know. } Thanks again, guys and gals. } You're welcome. DAS -- David Snyder @ Snide Computer Services - Folcroft, PA Current Release is db4glgen-3.11 UUCP: ..!uunet!das13!dave INTERNET: dave.snyder@snide.com