|
IDS Forum
Re: NO MORE EXTENTS; System is so slow
Posted By: Stephanie_Peltier@txnp.uscourts.gov Date:
This is a multipart message in MIME format. --=_related 0054D20286256D6D_= Content-Type: multipart/alternative; boundary="=_alternative 0054D20286256D6D_="
--=_alternative 0054D20286256D6D_= Content-Type: text/plain; charset="us-ascii"
I would use the dbexport command in Informix to save off the table and data - I believe it automatically breaks up the data files into manageable sizes. In addition, if you have views, etc. dependent upon the file you are reorganizing you will lose them when you drop the table. When possible, if you can export the entire database, you can correct the table that has too many extents, then bring everything back in. The syntax is:
dbexport -c -q databasename -ss > logfile 2>&1
where logfile is the name of the outfile you want to create to review after your export to ensure that there were no errors.
The flags have the following meaning:
-c This flag makes dbexport complete unless a fatal error occurs; it will not stop for any errors except: a. can't open tape device b. bad writes c. invalid command parameters d. can't open database or no system permissions
-q Suppresses display of errors, warnings, and SQL data definition statements
-ss Stands for server-specific (specifies initial and next extent sizes, dbspace sizes, etc.)
The command will create a new directory named database_name.exp. Within this directory will be a database_name.sql file, and as many *.dat files as there are tables in your database. These *.dat files are pipe-delimited text files that will be used to reload the tables during a "dbimport". The syntax for the import is:
dbimport -c -q -i /home/informix databasename > logfile 2>&1
Important: You cannot run EITHER dbexport or dbimport unless you have exclusive access to the database.
However, if your database is very large and you don't have room (or time) to export and import the whole thing, just make sure what the dependencies are so that you can make sure to back them up and restore them as well. Then you can use the dbload and dbunload so that you can commit every 10000 records or so to avoid a long transaction. Look in the Migration Guide for details on how all these work!
"BRIAN SMITH" <bsmith@lyrix.com> Sent by: forum.subscriber@iiug.org 07/24/2003 08:02 AM
To: ids@iiug.org cc: Subject: Re: NO MORE EXTENTS; System is so slow [1589]
What is the output of 'oncheck -pe'?
When you created the 'exports' table, did you specify an extent size? Example: create table exports ( blah blah, blah2 blah, . . . ) extent size XXXXXX next size YYYYYY;
XXXXXX is the starting extent size in kilobytes based on how much data you expect your table to hold. YYYYYY is the size of the next extent on kilobytes that the Informix engine will allocate for the table if the existing extents are all full. If an extent size is not specified when the table is created, it defaults to something like 16KB (8 pages). As the table grows, the engine will allocate larger and larger extents, but it is still possible to run out of extents for the table. I believe each table can only have a maximum of 253 extents in Informix IDS 7.30.
I think your best course of action would be to unload your table somehow to save your data, then drop the table and recreate it with extent sizes and then reload your data. You may have to unload it in sections because the total size of the output unload file would more than likely be larger than 2 Gig, which is the largest file size SCO's HTFS filesystem can support, I think. Since your table is so large, I'd pick 'extent size 300000 next size 300000' since those values are somewhat even multiples of your chunk sizes.
As for the slowness, are you periodically performing an 'update statistics' command? The simplest form of this would be (in a shell script):
#!/bin/sh isqlrf databasename <<! update statistics; !
You might want to read up on 'update statistics' in the Informix manuals to learn how you can fine-tune what it does for your particular application.
- Brian
--=_alternative 0054D20286256D6D_= Content-Type: text/html; charset="us-ascii"
<br><font size=2 face="sans-serif">I would use the dbexport command in Informix to save off the table and data - I believe it automatically breaks up the data files into manageable sizes. In addition, if you have views, etc. dependent upon the file you are reorganizing you will lose them when you drop the table. When possible, if you can export the entire database, you can correct the table that has too many extents, then bring everything back in. The syntax is:</font> <br> <br><font size=2 face="sans-serif"><b>dbexport -c -q databasename -ss > logfile 2>&1</b></font> <br> <br><font size=2 face="sans-serif">where logfile is the name of the outfile you want to create to review after your export to ensure that there were no errors.</font> <br> <br><font size=2 face="sans-serif">The flags have the following meaning:</font> <br> <br><font size=2 face="sans-serif">-c This flag makes dbexport complete unless a fatal error occurs; it will not stop for any errors except:</font> <br><font size=2 face="sans-serif"> a. can't open tape device</font> <br><font size=2 face="sans-serif"> b. bad writes</font> <br><font size=2 face="sans-serif"> c. invalid command parameters</font> <br><font size=2 face="sans-serif"> d. can't open database or no system permissions</font> <br> <br><font size=2 face="sans-serif">-q Suppresses display of errors, warnings, and SQL data definition statements</font> <br> <br><font size=2 face="sans-serif">-ss Stands for server-specific (specifies initial and next extent sizes, dbspace sizes, etc.)</font> <br> <br><font size=2 face="sans-serif">The command will create a new directory named database_name.exp. Within this directory will be a database_name.sql file, and as many *.dat files as there are tables in your database. These *.dat files are pipe-delimited text files that will be used to reload the tables during a "dbimport". The syntax for the import is:</font> <br> <br><font size=2 face="sans-serif"><b>dbimport -c -q -i /home/informix databasename > logfile 2>&1</b></font> <br> <br><font size=2 face="sans-serif">Important: You cannot run EITHER dbexport or dbimport unless you have exclusive access to the database.</font> <br> <br><font size=2 face="sans-serif">However, if your database is very large and you don't have room (or time) to export and import the whole thing, just make sure what the dependencies are so that you can make sure to back them up and restore them as well. Then you can use the dbload and dbunload so that you can commit every 10000 records or so to avoid a long transaction. Look in the Migration Guide for details on how all these work!</font> <br> <br><font size=2 face="sans-serif"><br> </font><img src=cid:_1_0240000060780054D20286256D6D> <br> <br> <br> <table width=100%> <tr valign=top> <td> <td><font size=1 face="sans-serif"><b>"BRIAN SMITH" <bsmith@lyrix.com></b></font> <br><font size=1 face="sans-serif">Sent by: forum.subscriber@iiug.org</font> <p><font size=1 face="sans-serif">07/24/2003 08:02 AM</font> <br> <td><font size=1 face="Arial"> </font> <br><font size=1 face="sans-serif"> To: ids@iiug.org</font> <br><font size=1 face="sans-serif"> cc: </font> <br><font size=1 face="sans-serif"> Subject: Re: NO MORE EXTENTS; System is so slow [1589]</font></table> <br> <br> <br><font size=2 face="Courier New">What is the output of 'oncheck -pe'?<br> <br> When you created the 'exports' table, did you specify an extent size?<br> Example:<br> create table exports<br> (<br> blah blah,<br> blah2 blah,<br> .<br> .<br> .<br> ) extent size XXXXXX next size YYYYYY;<br> <br> XXXXXX is the starting extent size in kilobytes based on how much data you expect your table to hold. YYYYYY is the size of the next extent on kilobytes that the Informix engine will allocate for the table if the existing extents are all full. If an extent size is not specified when the table is created, it defaults to something like 16KB (8 pages). As the table grows, the engine will allocate larger and larger extents, but it is still possible to run out of extents for the table. I believe each table can only have a maximum of 253 extents in Informix IDS 7.30.<br> <br> I think your best course of action would be to unload your table somehow to save your data, then drop the table and recreate it with extent sizes and then reload your data. You may have to unload it in sections because the total size of the output unload file would more than likely be larger than 2 Gig, which is the largest file size SCO's HTFS filesystem can support, I think. Since your table is so large, I'd pick 'extent size 300000 next size 300000' since those values are somewhat even multiples of your chunk sizes.<br> <br> As for the slowness, are you periodically performing an 'update statistics' command? The simplest form of this would be (in a shell script):<br> <br> #!/bin/sh<br> isqlrf databasename <<!<br> update statistics;<br> !<br> <br> You might want to read up on 'update statistics' in the Informix manuals to learn how you can fine-tune what it does for your particular application.<br> <br> - Brian<br> <br> <br> </font> <br> <br> --=_alternative 0054D20286256D6D_=-- --=_related 0054D20286256D6D_= Content-Type: image/gif Content-ID: <_1_0240000060780054D20286256D6D> Content-Transfer-Encoding: base64
R0lGODlh/wGPAOcAAAAAAP////j48AAAgAAAQCAggCAgQCAAgMDYwAAgQAAggCAAQKDI8MDAwAAA wCAgwEAggEBAgP7/+v/d3S4W3d0c7AcANAAAAEBAgAD/AAAAAIAAAAAAAAD///8AgACAAAAA/wAJ CQkJ/v/+//r/3d36/93dCMgAAEsC/v/SBAAAAPoBAAAAAAAAzAAAyAAEfv90x4wAyAABAAAAS0IO Aoy4EgC8sBIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAzasAJAsEAAAAAAAAAAD//wsEAAAAAAAAAAAAAAApCwQA AAAAAAAAAAAAAAAAAAAA////////AAAAAAAAAAAAAAAAAAAAAACiCwQAAAAAAAAAAAAAAPr/BgIC AAAAPkcAAPi34eI6uYxz4oMSALVkJYXmAAAAyVNgAGtqJYUIANioWgBrbSWGAAAAIAAAAQABAAAA +gEAAOAC+gEAABDH2KhaAGttJYbYqFoAa20lhgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD6 AQAAZMYAAAAAAAD6AQAArBkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD6AQAA8Bj6AQAA5FEAAAAA AAD6AQAAULoAAAAAAAD6AQAAIBr6AQAAEMf6AQAAUA36AQAAuLr6AQAAPAz6AQAACBj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e2iJjC VZkEZZN/GZhU2X/mSElBkY+iaJnKApDEOZ2Z+VET2FBFuYHy54vPqWIyBp6//0dZgKiQT4IwA9E5 AvNmpUkkBeNWUwhAAZSMc6KEP1gQorUm3TgnfXWEG3OL3flbG1ZBLWSHODmU71SgQrmLsyhKDDgt FraORJkYD5Ji4sl8iVmVCAqcUcmA88egfHlJv5dfanKb8CkkZ5Yk6eKHVfItk7glDSmOqrWWNVJm RSUAVKKMSHRFhNI/MJKf8CkAOpqMZdZpteGOEoOkVel2g5kyaylZqMVUU2VEZVg6daaeOAKGbghZ lbUoV4aeWdRZcykv37KQb0WfO6qbe9gex9hDbYkmxriePKRnUhYA6kJABfE6kCiN9KJaR5WFQlSk Q1KIQqQ5Q2YwXrRZa8qm5VJiqOBYVBqZjQkTqaYTJEtCV7GVAMY4JDBSOnAoZTkGiQBjAJoqJKm2 qMMhVaGmlkBEaP2CRTd6Xg9ZRK8KWpslpZMaQFKKqrzaq776q8AKGQEBADs= --=_related 0054D20286256D6D_=--
Messages In This Thread
IDS Forum is maintained by Administrator with WebBBS 5.12.
|
|