<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-5559317973653027936</atom:id><lastBuildDate>Sun, 25 Jul 2021 20:44:44 +0000</lastBuildDate><category>innovator-c</category><category>free</category><category>beginner</category><category>benchmark</category><category>conference</category><category>oltp</category><category>iiug</category><category>performance tuning</category><category>11.7</category><category>excluded features</category><category>hdr</category><category>webcast</category><category>TimeSeries</category><category>cpuvp</category><category>i/o</category><category>iiug 2012</category><category>install</category><category>intermediate</category><category>marketing</category><category>ontape</category><category>roadshow</category><category>smart meter</category><category>upgrade</category><category>AWS</category><category>HCL</category><category>automatic storage provisioning</category><category>backup</category><category>buffers</category><category>chat with the labs</category><category>checkpoint</category><category>dbspace</category><category>disaster recovery</category><category>discover informix</category><category>fastest informix dba</category><category>fault tolerance</category><category>features</category><category>iiug 2013</category><category>iwa</category><category>logical log</category><category>migration</category><category>new features</category><category>onmode</category><category>onspaces</category><category>spl</category><category>sql</category><category>sql server</category><category>summit</category><category>support</category><category>training</category><category>warehouse accelerator</category><category>webinar</category><category>12.1</category><category>4gl</category><category>IPA</category><category>Informix</category><category>J5 offsuit really?</category><category>SSL</category><category>TLS</category><category>academic</category><category>advertising</category><category>aiovp</category><category>alarmprogram</category><category>application development</category><category>autonomic</category><category>big data</category><category>buffered logging</category><category>bugs</category><category>centaurus</category><category>chat</category><category>choice</category><category>chunk</category><category>chunks</category><category>client</category><category>collection</category><category>conference iiug advertising</category><category>connect</category><category>create aggregate</category><category>create index</category><category>create table</category><category>crm</category><category>data page</category><category>db2 express-c</category><category>dbaccess</category><category>ebook</category><category>encryption</category><category>enterprise replication</category><category>event</category><category>express</category><category>fillfactor</category><category>fix list</category><category>flexible grid</category><category>foreground write</category><category>genero</category><category>growth</category><category>high availability</category><category>iiug insider</category><category>iiug2010</category><category>iiug2014</category><category>index</category><category>informixdb</category><category>initialize</category><category>insider</category><category>instant message</category><category>kangaroos</category><category>lando calrissian</category><category>local user group</category><category>locks</category><category>lockwt</category><category>lru</category><category>lru write</category><category>max_fill_data_pages</category><category>mdm</category><category>meeting</category><category>merge</category><category>meter data management</category><category>miami</category><category>mysql</category><category>ninja</category><category>north america</category><category>onbar</category><category>oninit</category><category>onparams</category><category>open source</category><category>optofc</category><category>oracle</category><category>physical log</category><category>pricing</category><category>python</category><category>quick start</category><category>redbooks</category><category>request for enhancement</category><category>restore</category><category>rfe</category><category>scheduler</category><category>select for update</category><category>shard</category><category>slot entry</category><category>slot table</category><category>sql admin api</category><category>storage</category><category>stored procedure</category><category>string</category><category>survey</category><category>sushi</category><category>table level restore</category><category>tlr</category><category>troubleshooting</category><category>ultimate</category><category>update statistics</category><category>upsert</category><category>uptime</category><category>user defined aggregate</category><category>vNext</category><category>varchar</category><category>virtualization</category><category>vmware</category><category>weird</category><category>where current of</category><category>white paper</category><title>Informix DBA</title><description>Tips and tricks for Informix users of all skill levels.</description><link>http://www.informix-dba.com/</link><managingEditor>noreply@blogger.com (Andrew Ford)</managingEditor><generator>Blogger</generator><openSearch:totalResults>107</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-7446338535520863089</guid><pubDate>Mon, 21 May 2018 11:00:00 +0000</pubDate><atom:updated>2018-05-21T06:00:03.286-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">AWS</category><category domain="http://www.blogger.com/atom/ns#">collection</category><category domain="http://www.blogger.com/atom/ns#">HCL</category><category domain="http://www.blogger.com/atom/ns#">shard</category><title>Sharded Collections</title><description>Sharding allows you to seamlessly distribute rows of a table over multiple instances while keeping this implementation detail hidden from the client.&lt;br /&gt;&lt;br /&gt;This can be an extremely powerful tool that allows you distribute your work load over many smaller/cheaper instances, achieve greater parallelism for queries and scale up your environment as you grow.&lt;br /&gt;&lt;br /&gt;When people think of sharding, they typically think of MongoDB and the sharding of JSON documents over multiple nodes, which Informix can also do, but Informix can also shard a relational table over multiple nodes and that seems like a fun exercise. Let&#39;s try it!&lt;br /&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;b&gt;What we will do&lt;/b&gt;&lt;br /&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Create a second HCL Informix AWS instance&lt;/li&gt;&lt;li&gt;Configure both of our instances to allow sharding&lt;/li&gt;&lt;li&gt;Create a sharded collection for our relational stock_trans table&lt;/li&gt;&lt;li&gt;Create a third instance and add it to the sharded collection&lt;/li&gt;&lt;li&gt;Remove the second instance from our sharded collection&lt;/li&gt;&lt;li&gt;Do some performance testing along the way&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;Create a second HCL Informix AWS instance&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Follow the steps from the last two blog posts (&lt;a href=&quot;http://www.informix-dba.com/2018/05/getting-started-with-hcl-informix-on-aws.html&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt; and this) to setup a second AWS instance. Some steps you won&#39;t have to do because we will use the same Security Groups and Key Pair we created earlier.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. Create an new Elastic IP&lt;/div&gt;&lt;div&gt;2. Configure and launch a second HCL Informix EC2 instance using the Security Group and Key Pair we created earlier&lt;/div&gt;&lt;div&gt;3. Assign the Elastic IP to this new instance&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Configure both instances to allow sharding&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;We&#39;re going to follow steps 1 through 8 in the &lt;b&gt;AWS instance changes&lt;/b&gt;&amp;nbsp;section of the previous post to change the DBSERVERNAME from ol_aws to informix_1 and informix_2 and we&#39;re going to use the number in the DBSERVERNAME to map to a shard id. (informix_1 is shard 1, informix_2 is shard 2, etc).&lt;br /&gt;&lt;br /&gt;We also need to make some additional ONCONFIG changes on both instances. Make the following changes to informix_1 and bounce the engine. For informix_2, you can make these changes when you change the other ONCONFIG parameters.&lt;br /&gt;&lt;br /&gt;SHARD_ID &amp;lt;shard id&amp;gt;&lt;br /&gt;CDR_SERIAL 20,&amp;lt;shard id&amp;gt;&lt;br /&gt;CDR_AUTO_DISCOVER 1&lt;br /&gt;&lt;br /&gt;The table we are going to shard has a BIGSERIAL field and Informix sharding is build on Enterprise Replication so we want to ensure that serial values are unique across all shards and that is where CDR_SERIAL comes into play. When CDR_SERIAL is defined as 20,1 for shard 1 we will generate serial values of 1, 21, 41, 61, 81,... when rows are inserted on shard 1 and 2, 22, 42, 62, 82,... when rows are inserted on shard 2. I&#39;m limiting myself to a maximum of 20 shards with this configuration because I know I&#39;m not going to create more than that.&lt;br /&gt;&lt;br /&gt;CDR_AUTO_DISCOVER will allow us to use the cdr autoconfig server command that simplifies setting up Enterprise Replication&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We can also add the informix_2_ssl information to our client&#39;s sqlhosts file and test the connection from our client when informix_2 comes online.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;informix_1_ssl onsocssl &amp;lt;elastic ip&amp;gt; 9089&lt;br /&gt;informix_2_ssl onsocssl &amp;lt;elastic ip&amp;gt; 9089&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;br /&gt;2. Security Group&lt;br /&gt;&lt;br /&gt;We need to open up port 9088 for all of the servers in our private AWS network. First we need to figure out what the CIDR for our private network is. In the AWS console click Services in the top menu and search for VPC and open the VPC Dashboard. Click on Your VPCs in the left hand pane to bring up details for your VPCs. Find the value under IPv4 CIDR and remember it. It will be something like 172.31.0.0/16&lt;br /&gt;&lt;br /&gt;In the EC2 Dashboard, modify our Security Group again and add an inbound rule for TCP port 9088 with a Source of your IPv4 CIDR.&lt;br /&gt;&lt;br /&gt;3. Create a new Storage Pool&lt;br /&gt;&lt;br /&gt;For reasons unbeknownst to me, the cdr autoconfig server command just doesn&#39;t like the storage pool that comes with the engine. No problem, we can add a new storage pool to informix_1 and informix_2 with ease by running the following on both instances.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;gt; mkdir /data/storagepool_2&lt;br /&gt;&amp;gt; chmod 755 /data/storagepool_2&lt;br /&gt;&amp;gt; dbaccess sysadmin&lt;br /&gt;&lt;br /&gt;execute function task(&#39;STORAGEPOOL ADD&#39;,&#39;/data/storagepool_2&#39;,0,0,&#39;64MB&#39;,1);&lt;br /&gt;execute function task(&quot;modify config persistent&quot;, &quot;SBSPACENAME&quot;, &quot;sbspace1&quot;);&lt;br /&gt;execute function task(&#39;CREATE SBSPACE FROM STORAGEPOOL&#39;, &#39;sbspace1&#39;, &#39;100MB&#39;, 1);&lt;/pre&gt;&lt;br /&gt;4. Trusted Connections&lt;br /&gt;&lt;br /&gt;All of our shard servers need to connect to each other without supplying a password. We can do this by creating trusted hosts with the sysadmin:task function.&lt;br /&gt;&lt;br /&gt;Run the following sysadmin tasks on informix_1 only.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;execute function task(&quot;cdr add trustedhost&quot;, &quot;&amp;lt;informix_1 internal DNS name&amp;gt;&quot;);&lt;br /&gt;execute function task(&quot;cdr add trustedhost&quot;, &quot;&amp;lt;informix_2 internal DNS name&amp;gt;&quot;);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;5. Define the initial shard server with the cdr autoconfig server&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;informix_1&amp;gt; cdr autoconfig server&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This command is going to setup some ER dbspaces in our storage pool, automatically change our sqlhosts file to create an ER group and initialize our first ER server on informix_1&lt;br /&gt;&lt;br /&gt;6. Define the second shard server with cdr autoconfig server&lt;br /&gt;&lt;pre&gt;informix_2&amp;gt; cdr autoconfig server -H &amp;lt;informix_1 internal DNS name&amp;gt; -P 9088&lt;/pre&gt;&lt;br /&gt;This command does some nice things for us.&lt;br /&gt;&lt;br /&gt;Not only does it create our ER dbspaces like before, it add our new informix_2 server and group to all sqlhosts files in the ER network, propagates the trusted host information from informix_1 to all servers in the ER network and starts ER on informix_2.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;Created sharded collection&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;We&#39;re going to drop the old stocks database we created earlier and recreate the stocks database and stock_trans table on both servers.&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;database sysmaster;&lt;br /&gt;&lt;br /&gt;drop database if exists stocks;&lt;br /&gt;&lt;br /&gt;create database stocks in dbs_1 with buffered log;&lt;br /&gt;&lt;br /&gt;create table stock_trans (&lt;br /&gt;   id            bigserial,&lt;br /&gt;   account_id    integer,&lt;br /&gt;   stock_id      integer,&lt;br /&gt;   action        char(1),&lt;br /&gt;   shares        integer,&lt;br /&gt;   price         float,&lt;br /&gt;   timestamp     datetime year to second&lt;br /&gt;) in dbs_1 extent size 20000 next size 20000 lock mode row;&lt;br /&gt;&lt;br /&gt;create unique index stock_trans_pk on stock_trans(id);&lt;br /&gt;alter table stock_trans add constraint primary key (id)&lt;br /&gt;        constraint stock_trans_pk;&lt;br /&gt;&lt;br /&gt;grant connect to client;&lt;br /&gt;&lt;br /&gt;grant select, insert, update, delete on stock_trans to client;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;The next step is to run the cdr define shardCollection command, but I think we need to pause for a second and talk about what&#39;s going to happen when we do and some steps our clients are going to need to do to take to take advantage of sharding.&lt;br /&gt;&lt;br /&gt;When the shard is created for the stock_trans table and sharding is enabled by the client and we insert a row into the stock_trans table the row will eventually end up physically living on informix_1 or informix_2, but the client doesn&#39;t know or care. The same goes for select, update and delete, the sharding is invisible to the client. To the client the stock_trans table just looks like a regular table with the exception that it can be accessed from either informix_1 or informix_2.&lt;br /&gt;&lt;br /&gt;We will tell the shard collection to determine which shard to put a row on based on a hash of the id field which will give us a pretty even distribution of data over all our shards.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;cdr define shardCollection stock_trans_collection stocks:informix.stock_trans --type=delete --key=id --strategy=chash --partitions=3 --versionCol=id g_informix_1 g_informix_2&lt;/pre&gt;&lt;br /&gt;Now that the shard collection has been defined, the stock_trans tables on informix_1 and informix_2 will effectively been joined into one table when the client sets the use_sharding session environment to on via &#39;set environment use_sharding on&#39;.&lt;br /&gt;&lt;br /&gt;After connecting to informix_1, setting &#39;use_sharding on&#39; and inserting 10,000 records I can see that the collection is working.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;set environment use_sharding on;&lt;br /&gt;&lt;br /&gt;select &#39;informix_1&#39;, count(*) from stocks@informix_1:stock_trans; -- table only&lt;br /&gt;select &#39;informix_2&#39;, count(*) from stocks@informix_2:stock_trans; -- table only&lt;br /&gt;select &#39;collection&#39;, count(*) from stock_trans;                   -- collection&lt;br /&gt;&lt;br /&gt;(constant)       (count(*))&lt;br /&gt;&lt;br /&gt;informix_1             6742&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(constant)       (count(*))&lt;br /&gt;&lt;br /&gt;informix_2             3258&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(constant)       (count(*))&lt;br /&gt;&lt;br /&gt;collection            10000&lt;br /&gt;&lt;br /&gt;select first 5 account_id, sum(shares) from stock_trans group by 1 order by 2 desc;&lt;br /&gt;&lt;br /&gt; account_id            (sum)&lt;br /&gt;&lt;br /&gt;       5803             7376&lt;br /&gt;       6637             6985&lt;br /&gt;       5232             6714&lt;br /&gt;       1432             6596&lt;br /&gt;       2315             6485&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The first 2 selects query the stock_trans table that is physically located on each instance, but the third and fourth select query the collection. Behind the scenes both stock_trans tables are queried in parallel and the results are merged and send back to the client.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Add a new shard to the collection&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;Over time our stock business has grown and and 2 shards isn&#39;t enough for our workload, so we would like to add a third.&lt;br /&gt;&lt;br /&gt;You can follow the steps we used to create informix_2 to create informix_3, making sure to run the &quot;cdr add trustedhost&quot; sysadmin:task on informix_1 to add informix_3 to the list of trusted hosts and run the same cdr autoconfig serv command on informix_3 that we used to add informix_2. Don&#39;t forget to create the client user, stock database and stock_trans table on informix_3.&lt;br /&gt;&lt;ul&gt;&lt;/ul&gt;When informix_3 has been added to the ER network, run the cdr change shardCollection command to add a new informix_3 shard and automatically rebalance data over the 3 shards&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;cdr change shardCollection stock_trans_collection --add g_informix_3&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;We can verify the collection rebalanced and is working properly&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;set environment use_sharding on;&lt;br /&gt;&lt;br /&gt;select &#39;informix_1&#39;, count(*) from stocks@informix_1:stock_trans; -- table only&lt;br /&gt;select &#39;informix_2&#39;, count(*) from stocks@informix_2:stock_trans; -- table only&lt;br /&gt;select &#39;informix_3&#39;, count(*) from stocks@informix_3:stock_trans; -- table only&lt;br /&gt;select &#39;collection&#39;, count(*) from stock_trans;                   -- collection&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(constant)       (count(*))&lt;br /&gt;&lt;br /&gt;informix_1             2876&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(constant)       (count(*))&lt;br /&gt;&lt;br /&gt;informix_2             3258&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(constant)       (count(*))&lt;br /&gt;&lt;br /&gt;informix_3             3866&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(constant)       (count(*))&lt;br /&gt;&lt;br /&gt;collection            10000&lt;br /&gt;&lt;/pre&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;Taking advantage of the sharded collection&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;In the last post we saw that going over the public internet slowed things down considerably, but we can use our new sharded setup to cut that time down.&lt;br /&gt;&lt;br /&gt;When we just had 1 stand alone table, it took 384.8 seconds to insert 10,000 stock_trans rows. What if we loaded 3 sets of data in parallel, 3333 rows to informix_1, 3333 rows to informix_2 and 3334 rows to informix_3?&lt;br /&gt;&lt;br /&gt;Splitting the data set and loading in parallel cuts the load time down to 163.4 seconds, over twice as fast as before.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Removing a shard from the collection&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;Let&#39;s say we no longer want informix_2 to be a shard. Hey, it happens. Removing it is easy.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;cdr change shardCollection stock_trans_collection --drop g_informix_2&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;When we take a look under the covers, we see that the informix_2 stock_trans table has been emptied and the rows redistributed among informix_1 and informix_3.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;set environment use_sharding on;&lt;br /&gt;&lt;br /&gt;select &#39;informix_1&#39;, count(*) from stocks@informix_1:stock_trans; -- table only&lt;br /&gt;select &#39;informix_2&#39;, count(*) from stocks@informix_2:stock_trans; -- table only&lt;br /&gt;select &#39;informix_3&#39;, count(*) from stocks@informix_3:stock_trans; -- table only&lt;br /&gt;select &#39;collection&#39;, count(*) from stock_trans;                   -- collection&lt;br /&gt;&lt;br /&gt;(constant)       (count(*))&lt;br /&gt;&lt;br /&gt;informix_1             6769&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(constant)       (count(*))&lt;br /&gt;&lt;br /&gt;informix_2                0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(constant)       (count(*))&lt;br /&gt;&lt;br /&gt;informix_3            13231&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(constant)       (count(*))&lt;br /&gt;&lt;br /&gt;collection            20000&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Well, that&#39;s enough fun for today. I hope you&#39;ve enjoyed taking shards and Informix on AWS for a test drive.&lt;br /&gt;&lt;br /&gt;I have a couple of other ideas for this technology. We definitely need to get some HDR Secondaries going. Not only because we like to have redundancy, but a secondary can also be used to satisfy selects and I&#39;d like to see how that improves response times. I also want to see how Updateable Secondaries work with shard collections.&lt;br /&gt;&lt;br /&gt;Don&#39;t forget to check out the IIUG World 2018 Informix event in Washington, DC October 28 to November 1, 2018. &lt;br /&gt;&lt;br /&gt;Early Registration is now open (save $275) and we are now accepting Speaker Proposals (save 100%) and we even have a &lt;a href=&quot;http://www.iiugworld.com/&quot; target=&quot;_blank&quot;&gt;new website&lt;/a&gt; from this century and a Twitter account you can follow &lt;a href=&quot;https://twitter.com/IIUGWorld&quot; target=&quot;_blank&quot;&gt;@IIUGWorld2018&lt;/a&gt;&amp;nbsp;for the latest updates.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://iiugworld.com/img/logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;244&quot; data-original-width=&quot;250&quot; src=&quot;https://iiugworld.com/img/logo.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2018/05/sharded-collections.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>19</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-9039973266826452831</guid><pubDate>Mon, 14 May 2018 11:00:00 +0000</pubDate><atom:updated>2018-05-14T10:55:06.208-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">AWS</category><category domain="http://www.blogger.com/atom/ns#">encryption</category><category domain="http://www.blogger.com/atom/ns#">HCL</category><category domain="http://www.blogger.com/atom/ns#">Informix</category><category domain="http://www.blogger.com/atom/ns#">SSL</category><category domain="http://www.blogger.com/atom/ns#">TLS</category><title>Encrypted Database Connections to HCL Informix on AWS</title><description>In my&amp;nbsp;&lt;a href=&quot;http://www.informix-dba.com/2018/05/getting-started-with-hcl-informix-on-aws.html&quot; target=&quot;_blank&quot;&gt;last post&lt;/a&gt;&amp;nbsp;we launched an HCL Informix AWS instance and verified the engine was running, now I want to connect to this instance from my data center over the public internet.&lt;br /&gt;&lt;br /&gt;I can&#39;t just send data back and forth without encrypting it because I don&#39;t want my data intercepted by someone in between. I&#39;ll enable TLS encryption to keep my data secret and I&#39;ll also create a transaction table, insert some data and do some basic performance testing. In later posts, I will shard this transaction table over multiple AWS Informix instances and I&#39;ll do a little prep work to make that step easier.&lt;br /&gt;&lt;br /&gt;If you don&#39;t plan to connect to your Informix instance over the public internet and keep all of your communications between servers in the same VPC then this encryption step is unnecessary, but it is still good to know how to do it.&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;There is one rub. You&#39;re going to need to get your hands on a later version of the CSDK that comes with GSKit 8 (I know version 4.10 of the CSDK works) and that is currently kind of a challenge. As of this writing, you can &lt;a href=&quot;https://www.hcltech.com/contact-us/customer&quot; target=&quot;_blank&quot;&gt;contact HCL&lt;/a&gt; and ask for it or if you have an IBM Passport Advantage login, you can download it there. I&#39;m going to assume you have an appropriate CSDK installed on the client. If you need help installing the CSDK on a client, leave a note in the comments and I&#39;ll add them to the post.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Prerequisites&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://www.informix-dba.com/2018/05/getting-started-with-hcl-informix-on-aws.html&quot; target=&quot;_blank&quot;&gt;HCL Informix on AWS engine setup and running&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Informix CSDK 4.10 installed on the client&lt;/li&gt;&lt;li&gt;I will use the informixdb Python module to connect to Informix from my client, you can use whatever you like&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;What we are going to do&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Open up a port on our AWS instance for TLS communications&lt;/li&gt;&lt;li&gt;AWS instance changes&lt;/li&gt;&lt;li&gt;Use the HCL Informix certificate to create a TLS/SSL key store on the client&lt;/li&gt;&lt;li&gt;Connect over the public internet and do some testing&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;Open up a port on AWS instance for TLS communications&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;In our Security Group we only let connections from port 22 for ssh into our AWS instance and if we&#39;re going to connect to Informix we need to open up a port.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In Security Groups on the AWS console, select our Security Group and click Actions and then click Edit inbound rules.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the dialogue that is opened up click the Add Rule button and add a rule of:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Type: Custom TCP Rule&lt;/li&gt;&lt;li&gt;Protocol: TCP&lt;/li&gt;&lt;li&gt;Port Range: 9089&lt;/li&gt;&lt;li&gt;Source: Custom and the public IP address or range of your client OR you can use Anywhere if you don&#39;t (just for the purposes of testing)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Click Save and your AWS firewall will now allow traffic on port 9089 from your client over the public internet.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;AWS instance changes&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;I&#39;m going to make some changes to my ONCONFIG and sqlhosts that will really be more useful in future posts when I setup sharding, but I&#39;ll do them now.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;1. ssh to your AWS instance and sudo -u informix bash&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2. ONCONFIG changes&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I&#39;m going to change the name of my instance to something more unique so I can start multiple instances later.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Change DBSERVERNAME from ol_aws to informix_1&lt;/div&gt;&lt;div&gt;Change DBSERVERALIASES to informix_1_ssl&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3. sqlhosts changes: replace contents with the following. You can find the internal DNS name for an EC2 instance in the details of the instance in the AWS console.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;informix_1&amp;nbsp; &amp;nbsp; &amp;nbsp;onsoctcp &amp;lt;internal DNS Name&amp;gt;&amp;nbsp; &amp;nbsp;9088&amp;nbsp;&lt;br /&gt;informix_1_ssl onsocssl *&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;            9089&amp;nbsp;&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;4. Edit /etc/profile.d/informix.sh and change INFORMIXSERVER to informix_1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5. Shutdown the engine via onmode -ky&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;6. Exit back to the centos user, sudo -u root bash and rename the engine&#39;s SSL files&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The engine looks for these ssl files in the $INFORMIXDIR/ssl/&amp;lt;dbservername&amp;gt;.extension. We changed the DBSERVERNAME, so we need to rename these.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;cd $INFORMIXDIR/ssl/&lt;br /&gt;mv ol_aws.rdb informix_1.rdb&lt;br /&gt;mv ol_aws.crl informix_1.crl&lt;br /&gt;mv ol_aws.sth informix_1.sth&lt;br /&gt;mv ol_aws.kdb informix_1.kdb&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;7. Exit back to the centos user, sudo -u informix bash and start the engine with oninit -v&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;8. Create a database user named &#39;client&#39; that we will use to connect&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;echo &quot;create user client with password &#39;your_password&#39; account unlock properties user nobody authorization(dbsa)&quot; | dbaccess sysmaster&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Create TLS key store on the client&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;1. On the AWS instance, copy the TLS certificate to /tmp&lt;/div&gt;&lt;div&gt;&lt;pre&gt;cp /home/informix/client_ssl/selfsigned_ssl.cert /tmp&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;2. Create a client_ssl directory on the client server and get the selfsigned_ssl.cert file&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I&#39;m doing this as user informix and I&#39;ve decided to create /home/informix/client_ssl to mirror HCL&#39;s setup. Feel free to put this directory wherever you see fit.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;mkdir /home/informix/client_ssl&lt;br /&gt;scp -i ~/.ssh/informixdba.pem centos@&amp;lt;elastic ip&amp;gt;:/tmp/selfsigned_ssl.cert .&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;3. Create a TLS key store&lt;/div&gt;&lt;div&gt;&lt;pre&gt;/usr/local/ibm/gsk8_64/bin/gsk8capicmd_64 -keydb -create -db informix_ssl.kdb -pw &amp;lt;a password&amp;gt; -type cms -stash&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;4. Add the AWS certificate to the key store&lt;/div&gt;&lt;div&gt;&lt;pre&gt;/usr/local/ibm/gsk8_64/bin/gsk8capicmd_64 -cert -add -db informix_ssl.kdb -pw &amp;lt;the password&amp;gt; -label selfsigned_ssl -file selfsigned_ssl.cert -format ascii&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;5. Create a conssl.cfg file on the client&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create $INFORMIXDIR/etc/conssl.cfg and add&lt;/div&gt;&lt;div&gt;&lt;pre&gt;SSL_KEYSTORE_FILE&amp;nbsp; &amp;nbsp;/home/informix/client_ssl/informix_ssl.kdb&amp;nbsp; &amp;nbsp;# Keystore file&lt;br /&gt;SSL_KEYSTORE_STH&amp;nbsp; &amp;nbsp; /home/informix/client_ssl/informix_ssl.sth&amp;nbsp; &amp;nbsp;# Keystore stash file&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;and &lt;b&gt;change the permissions of informix_ssl.kdb and informix_ssl.sth&lt;/b&gt; via chmod 644 &amp;lt;filename&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;6. Add the encrypted connection to the client&#39;s sqlhosts file&lt;/div&gt;&lt;div&gt;&lt;pre&gt;informix_1_ssl&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; onsocssl&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 52.0.114.137&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 9089&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;You will now be able to connect to informix_1_ssl with dbaccess as the user &#39;client&#39; and create a database and a table that we will use for some testing.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;pre&gt;create database stocks in dbs_1 with buffered log;&lt;br /&gt;&lt;br /&gt;create table stock_trans (&lt;br /&gt;&amp;nbsp; &amp;nbsp;id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bigserial,&lt;br /&gt;&amp;nbsp; &amp;nbsp;account_id&amp;nbsp; &amp;nbsp; integer,&lt;br /&gt;&amp;nbsp; &amp;nbsp;stock_id&amp;nbsp; &amp;nbsp; &amp;nbsp; integer,&lt;br /&gt;&amp;nbsp; &amp;nbsp;action&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; char(1),&lt;br /&gt;&amp;nbsp; &amp;nbsp;shares&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; integer,&lt;br /&gt;&amp;nbsp; &amp;nbsp;price&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;float,&lt;br /&gt;&amp;nbsp; &amp;nbsp;timestamp&amp;nbsp; &amp;nbsp; &amp;nbsp;datetime year to second&lt;br /&gt;) in dbs_1 extent size 20000 next size 20000 lock mode row;&lt;br /&gt;&lt;br /&gt;create unique index stock_trans_pk on stock_trans(id);&lt;br /&gt;alter table stock_trans add constraint primary key (id)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; constraint stock_trans_pk;&lt;br /&gt;&lt;/pre&gt;&lt;div&gt;I created a simple Python script to generate and insert 10,000 records into the stock_trans table and I ran 3 tests.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The first test is to run the script locally on the AWS instance to get a baseline of how long it takes the engine to process the inserts without any encryption and without going over the public internet.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Average per row 0.00011 seconds&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The second test is to perform the inserts over the public internet, but without any encryption enabled. This will show me how much overhead is added by the public internet.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Average per row:&amp;nbsp;0.03660 seconds&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;That&#39;s not a terribly unexpected result, but the internet does add some considerable overhead. The final test is to perform the inserts over the public internet using encryption to see how much overhead it adds.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Average per row : 0.03848 seconds&lt;br /&gt;&lt;div&gt;&lt;br /&gt;We can see that encryption is relatively inexpensive, only costing a couple milliseconds per row insert.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;That&#39;s all for today. Next time I will create a sharded collection of our stock_trans table over multiple AWS instances, add and remove shards from the collection and do some more performance testing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Don&#39;t forget to check out the IIUG World 2018 Informix event in Washington, DC October 28 to November 1, 2018.&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;Early Registration is now open (save $275) and we are now accepting Speaker Proposals (save 100%) and we even have a &lt;a href=&quot;http://www.iiugworld.com/&quot; target=&quot;_blank&quot;&gt;new website&lt;/a&gt; from this century and a Twitter account you can follow &lt;a href=&quot;https://twitter.com/IIUGWorld&quot; target=&quot;_blank&quot;&gt;@IIUGWorld2018&lt;/a&gt;&amp;nbsp;for the latest updates.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://iiugworld.com/img/logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://iiugworld.com/img/logo.png&quot; data-original-height=&quot;244&quot; data-original-width=&quot;250&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2018/05/encrypted-database-connections-to-hcl.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>14</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-1085540451116186378</guid><pubDate>Sun, 06 May 2018 01:44:00 +0000</pubDate><atom:updated>2018-05-07T11:59:56.503-05:00</atom:updated><title>Getting Started with HCL Informix on AWS</title><description>It&#39;s Saturday night and I&#39;ve got a few cold ones in the fridge so let&#39;s do this. Let&#39;s get an HCL Informix instance up and running on AWS.&lt;br /&gt;&lt;br /&gt;Prerequisites:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;You have an AWS account (&lt;a href=&quot;https://portal.aws.amazon.com/billing/signup#/start&quot; target=&quot;_blank&quot;&gt;sign up&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;Your OS is some flavor of Unix/Linux (not really that important)&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;What are we going to do?&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Create an AWS Elastic IP address&lt;/li&gt;&lt;li&gt;Create an AWS Security Group&lt;/li&gt;&lt;li&gt;Create a ssh key pair&lt;/li&gt;&lt;li&gt;Configure and launch an EC2 instance running HCL Informix&lt;/li&gt;&lt;li&gt;Connect to our EC2 instance and verify the engine is up and running&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;b&gt;Create an AWS Elastic IP address (optional)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;When you launch an AWS EC2 instance, the instance is given a private IP address and private DNS name that are accessible from all of the EC2 instances in your AWS Virtual Private Cloud (VPC) and these never change for as long as the EC2 instance exists, even if you shut it down and restart it. Nice.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Additionally, when you launch an EC2 instance, it is given a public IP address and public DNS name that is accessible from the public internet, BUT this changes each time you restart the EC2 instance and that&#39;s not so nice.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;An Elastic IP address is a public IP address and DNS name that you can assign to an EC2 instance so it always has the same IP when you stop/start the EC2 instance and just makes things a little easier. Elastic IPs are free as long as they are attached to a running instance and cost just a penny an hour when they aren&#39;t. If that&#39;s a little too pricey for you, you can skip this step and connect to the public IP address that&#39;s automatically given to your EC2 instance. Just remember that you&#39;ll have to go and figure out what the new public IP/DNS name is for your instance from the console each time you stop/start your EC2 instance.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;First, open up the &lt;a href=&quot;https://console.aws.amazon.com/&quot; target=&quot;_blank&quot;&gt;AWS console&lt;/a&gt;, click on &lt;a href=&quot;https://console.aws.amazon.com/ec2&quot; target=&quot;_blank&quot;&gt;EC2&lt;/a&gt;&amp;nbsp;and then click Elastic IPs in the left hand pane under NETWORK &amp;amp; SECURITY.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now click the Allocate new address button and then the Allocate button. You should see a message of New address request succeeded and the new Elastic IP address. Make note of this IP and click the Close button.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html&quot; target=&quot;_blank&quot;&gt;Learn more&lt;/a&gt;&amp;nbsp;about Elastic IP addresses&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Create an AWS Security Group (optional, but go ahead and do it)&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;An AWS Security Group is like a firewall where you define which ports are open to certain IP addresses. We&#39;re not going to do anything fun with the Security Group now, we&#39;re just going to open up the SSH port to the world so we can get into the box. It&#39;ll come in handy later though.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the left hand pane of the AWS EC2 Console, click Security Groups under NETWORK &amp;amp; SECURITY.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now click the Create Security Group button. This will give you the Create Security Group pop up where you can give the Security group a name of &quot;Informix DBA SG&quot; and a description of whatever you like. You can leave the VPC as the prepopulated default value.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now click the Add Rule button to add an inbound rule. For Type, select SSH and Source select Anywhere then click the Create button in the lower right corner.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html&quot; target=&quot;_blank&quot;&gt;Learn more&lt;/a&gt;&amp;nbsp;about Security Groups&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Create a SSH Key Pair&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;All logins into AWS EC2 instances are passwordless so you need a SSH key pair to login via some command that will look a little like this&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;code&gt;ssh -i &amp;lt;public ssh key file&amp;gt; centos@&amp;lt;ip address or DNS name&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Click Key Pairs on the left hand pane under NETWORK &amp;amp; SECURITY and then click the Create Key Pair button.&lt;br /&gt;&lt;br /&gt;Give the Key Pair a name as instructed (I&#39;m using informixdba) and click the Create button.&lt;br /&gt;&lt;br /&gt;This will create and download an informixdba.pem file to your browser, save it somewhere nice like ~/.ssh because you&#39;ll need to reference it later and change the file permissions to 600 via chmod 660 ~/.ssh/informixdba.pem&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Configure and launch an EC2 instance running HCL Informix&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;Finally, the prep is done and we&#39;re ready to get into the good stuff.&lt;br /&gt;&lt;br /&gt;Click Instances on the left hand pane under INSTANCES and click the Launch Instance button.&lt;br /&gt;&lt;br /&gt;Step 1 is to Choose the Amazon Machine Image (AMI) we want to have running on our EC2 instance. We would like the HCL Informix AMI that is found in the AWS Marketplace, so click AWS Marketplace in the left hand pane and type Informix in the Search AWS Marketplace Products bar.&lt;br /&gt;&lt;br /&gt;The first item in the returned list should be Informix sold by HCL Technologies. Find it and click the Select button.&lt;br /&gt;&lt;br /&gt;You&#39;ll be presented with a bunch of information about pricing and the product details. Take it all in and then click Continue.&lt;br /&gt;&lt;br /&gt;Step 2 is to Choose an Instance type. Here we get to decide how much CPU/RAM we want our EC2 instance to have. Select a t2.small instance for now and click Next: Configure Instance Details. It is super easy to upgrade later if you want.&lt;br /&gt;&lt;br /&gt;Step 3 is Configure Instance Details. We aren&#39;t going to do anything here except maybe check the Protect against accidental termination box which will prevent us from destroying the EC2 instance unless we explicitly turn this feature off. This of it like the FULL_DISK_INIT ONCONFIG parameter for EC2 instances. Click Next: Add Storage.&lt;br /&gt;&lt;br /&gt;Step 4 is Add Storage. Here we can increase the amount of disk space initially allocated to the EC2 instance. For our purposes, the default of 8GB is enough. You can always extend this later if you need more space. Click Next: Add Tags.&lt;br /&gt;&lt;br /&gt;Step 5 is Adding tags, meh. Click Next: Configure Security Group.&lt;br /&gt;&lt;br /&gt;Step 6 is Configure Security Group where we&#39;ll specify the Security Group we created earlier that opens SSH up to the public. Click the Select an existing security group radio button, click on the Informix DBA SG Security Group we created earlier and then click the Review and Launch button.&lt;br /&gt;&lt;br /&gt;Step 7 is review where you review your settings and pricing. Enough already, let&#39;s roll. Click the Launch button.&lt;br /&gt;&lt;br /&gt;Not so fast...after clicking Launch we&#39;ve got to setup what SSH key pair we want to use to connect to this instance. Select the informixdba key pair we created earlier, click the I acknowledge box and click the Launch Instances button.&lt;br /&gt;&lt;br /&gt;We&#39;re given a Launch Status screen, our instance is now launching and we&#39;re almost ready to connect to it. Scroll down and click the View Instances button on the bottom right hand side.&lt;br /&gt;&lt;br /&gt;Most likely you&#39;ll see our t2.small instance in an Instance State of running (and Status Checks of Initializing). The last thing we want to do is assign that Elastic IP address we created earlier to this instance.&lt;br /&gt;&lt;br /&gt;Click Elastic IPs in the left hand pane under NETWORK &amp;amp; SECURITY, select the Elastic IP we created earlier (if you only have one, it will already be selected), click the Actions button and select Associate address from the drop down menu.&lt;br /&gt;&lt;br /&gt;In the Instance drop down, select the EC2 instance we just launched and click the Associate button.&lt;br /&gt;&lt;br /&gt;After you get the Associate address request succeeded message, click the Close button and we&#39;re ready to ssh to this instance using the public IP/DNS name that won&#39;t change if we stop/start this instance.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Connect to our EC2 instance and verify the engine is up and running&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;Well, here we are, ready to take our new HCL Informix instance for a test drive. I hope it took longer to type all of that up than it did for you to get to this point. Let&#39;s connect to it and see what&#39;s what.&lt;br /&gt;&lt;br /&gt;ssh -i ~/.ssh/informixdba.pem centos@&amp;lt;elastic IP address or DNS name&amp;gt;&lt;br /&gt;&lt;br /&gt;Answer yes to the question about continuing to connect and you should be connected to your brand new EC2 instance running HCL Informix. The centos user is the only account that can ssh into this instance and can only authenticate with that informixdba.pem file so don&#39;t lose it.&lt;br /&gt;&lt;br /&gt;The centos user doesn&#39;t know anything about Informix, but the informix user does so we need to switch to informix after logging in via&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sudo -u informix bash&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now we should be able to see the engine and what&#39;s the first thing an Informix DBA does instinctively when logging into a box?&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;[informix@ip-111-11-19-178 centos]$ onstat -&lt;br /&gt;&lt;br /&gt;HCL Informix Dynamic Server Version 12.10.FC10ME -- On-Line -- Up 00:13:43 -- 347700 Kbytes&lt;br /&gt;&lt;/pre&gt; Ain&#39;t that sumthin&#39;?&lt;br /&gt;&lt;br /&gt;That&#39;s all for now, next time I&#39;ll setup encrypted communications between a client and this instance over the public internet and do some performance testing.&lt;br /&gt;&lt;br /&gt;Don&#39;t forget about IIUG World 2018 in Washington, DC October 28 - November 1, 2018.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://www.iiug.org/conf/2018/iiug/register.php&quot; target=&quot;_blank&quot;&gt;Register&lt;/a&gt; before July 15, 2018 for a $275 discount and &lt;a href=&quot;http://iiugworld.com/cfp.php&quot; target=&quot;_blank&quot;&gt;submit to present&lt;/a&gt; for a 100% discount at &lt;a href=&quot;http://iiugworld.com/&quot;&gt;iiugworld.com&lt;/a&gt;.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2018/05/getting-started-with-hcl-informix-on-aws.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>95</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-8346890592867735534</guid><pubDate>Thu, 03 May 2018 19:07:00 +0000</pubDate><atom:updated>2018-05-07T11:58:03.605-05:00</atom:updated><title>Hello Blogger, My Old Friend...</title><description>...it&#39;s time for me to write something on you again.&lt;br /&gt;&lt;br /&gt;I haven&#39;t been writing here because I only want to write when I have something new and interesting to say and...well...I haven&#39;t had anything new or interesting to write about Informix because at this point my engines just behave themselves and run and run and run and run so I&#39;ve been off in development land doing things with Python, some Javascript and a little bit of NoSQL (calm down).&lt;br /&gt;&lt;br /&gt;That all changed with the return of the Chat with the Labs last week where Nick Geib from HCL spend a good hour and a half showing us the new HCL Informix on Amazon Web Servics (AWS) offering and my interest was piqued.&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;I&#39;ve done some basic playing around with it and in future posts I want to tell you about some basic performance tests I&#39;ve run, setting up encrypted communication so you can safely talk to these AWS instances over the public internet, how to use AWS instances to shard a relational table over multiple instances and how to dynamically (mostly) scale the number of shards up or down. It&#39;s preeeeetty cool stuff.&lt;br /&gt;&lt;br /&gt;For now, here&#39;s a quick introduction to HCL Informix on AWS.&lt;br /&gt;&lt;br /&gt;HCL Informix is available as an Amazon Machine Instance (AMI), meaning when you launch an EC2 AWS instance (i.e. a virtual server) HCL Informix is already installed and running (it&#39;s also configured to automatically shutdown safely when you stop the instance).&lt;br /&gt;&lt;br /&gt;This is great for developers and DBAs with no Informix experience because it removes one barrier to entry for getting to know Informix, the installation, configuration and initialization which has always been a lot harder than say other engines like MySQL.&lt;br /&gt;&lt;br /&gt;You pay by the hour and you don&#39;t pay when the EC2 instance is stopped. If you just want to play around with the technology, you can be up in running in minutes and shut it down when you&#39;re done.&lt;br /&gt;&lt;br /&gt;The HCL Informix AMI is available on (almost?) every EC2 instance type, so you can try it out on a t2.small instance (1 core/2GB RAM) for $0.10/hour or on the HCL recommended m4.xlarge instance (4 cores/16GB) for $2.351/hour or you can get crazy and run on a x1e.32xlarge (128 cores/3904GB) for $95.505/hour.&lt;br /&gt;&lt;br /&gt;You can see for yourself at the&amp;nbsp;&lt;a href=&quot;https://aws.amazon.com/marketplace/pp/B077NRZTPQ?qid=1525373311464&amp;amp;sr=0-1&amp;amp;ref_=srh_res_product_title&quot; target=&quot;_blank&quot;&gt;AWS Marketplace&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Here&#39;s another cool thing. Everything is included in that price. You get the Enterprise Edition with all of the add ons for one price. Partitioning, PDQ, no CPU or disk limits, compression, IWA, MACH11. HCL calls this the ME version. Nick says it stands for &quot;My Edition&quot;, I say it stands for &quot;Most Everything™&quot;&lt;br /&gt;&lt;br /&gt;That&#39;s all for now, but I would be remiss if I didn&#39;t take this opportunity to plug the IIUG World 2018 Informix event in Washington, DC October 28 to November 1, 2018.&lt;br /&gt;&lt;br /&gt;Early Registration is now open (save $275) and we are now accepting Speaker Proposals (save 100%) and we even have a &lt;a href=&quot;http://www.iiugworld.com/&quot; target=&quot;_blank&quot;&gt;new website&lt;/a&gt; from this century and a Twitter account you can follow &lt;a href=&quot;https://twitter.com/IIUGWorld&quot; target=&quot;_blank&quot;&gt;@IIUGWorld2018&lt;/a&gt;&amp;nbsp;for the latest updates.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://iiugworld.com/img/logo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://iiugworld.com/img/logo.png&quot; data-original-height=&quot;244&quot; data-original-width=&quot;250&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2018/05/hello-blogger-my-old-friend.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>8</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-7555344230603114810</guid><pubDate>Fri, 19 Aug 2016 18:35:00 +0000</pubDate><atom:updated>2016-08-19T13:35:35.396-05:00</atom:updated><title>Audience Participation! Benchmark Edition</title><description>My company recently purchased new servers with dedicated storage, and any time this happens (and I have the luxury of time to do it), I take the opportunity to re-test my old assumptions concerning what storage configuration(s) work best.&amp;nbsp; The tests are ongoing, and will be for several days now, but I thought it would be fun to ask you all to &lt;i&gt;guess&lt;/i&gt; what you think the results will be.*&lt;br /&gt;&lt;br /&gt;First, the storage array details:&lt;br /&gt;&lt;br /&gt;It&#39;s equipped with 13x 15K RPM spinning drives with 12 Gbit/sec SAS interfaces.&amp;nbsp; The storage is not shared, meaning the host to which it&#39;s connected is the ONLY one that&#39;s using it.&amp;nbsp; One drive is reserved as a hot spare, leaving 12 usable drives.&amp;nbsp; I&#39;m testing the following configurations for performance:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;One Giant RAID-10 (&quot;1x12R10&quot;): Stripe and mirror all 12 drives in a single 12-drive stripeset&lt;/li&gt;&lt;li&gt;One Giant RAID-6 (&quot;1x12R6&quot;): Stripe all the drives in a single 12-drive stripeset with two parity drives&lt;/li&gt;&lt;li&gt;Two big RAID-10s (&quot;2x6R10&quot;): Two sets of six drives, each mirrored and striped as RAID-10&lt;/li&gt;&lt;li&gt;Two big RAID-6s (&quot;2x6R6&quot;): Two sets of six drives, striped with two parity drives per set&lt;/li&gt;&lt;li&gt;Three small RAID-10s (&quot;3x4R10&quot;): Three sets of four drives, each mirrored and striped as RAID-10&lt;/li&gt;&lt;li&gt;Plain RAID-1 (&quot;6xR1&quot;): Drives are mirrored but not striped&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;In all cases, I&#39;ve set up 6 equally-sized LUNs. In the 6xR1 case, each LUN corresponds neatly to a mirrored pair; In the 3x4R10 case, there are two LUNs on each stripeset; for the two-stripeset cases, there are three LUNs per set; and in the one-big-stripe case, obviously, all LUNs on the single set.&amp;nbsp; In all cases, I have &lt;b&gt;disabled&lt;/b&gt; the storage array&#39;s controller cache, because I want to emulate times of very high activity and test the &lt;i&gt;disk&lt;/i&gt;, not the cache.&lt;br /&gt;&lt;br /&gt;I&#39;m using two different tests as benchmarks: The first (call it the &quot;OLTP test&quot;) is the AGS TPM-C test, which you&#39;re familiar with if you&#39;ve ever participated the Advance Data Tools &quot;Fastest DBA&quot; contest.&amp;nbsp; For this test, all of the large tables are fragmented by hash across six dbspaces, one on each LUN.&amp;nbsp; There are six index dbspaces, also one per LUN, across which the indexes have been distributed in round-robin fashion. I did &lt;i&gt;not&lt;/i&gt; fragment/partition any of the indexes.&amp;nbsp; In this test, I have the buffer pools tuned very small, because to repeat, I&#39;m trying to test the &lt;i&gt;disk&lt;/i&gt;, not the rest of the system.&lt;br /&gt;&lt;br /&gt;The second test (call it the &quot;batch test&quot;) is a very large purge job that sequentially scans a table with two indexes and deletes about 2 million rows from that table.&amp;nbsp; The table itself is fragmented using a hash across three dbspaces, each on a separate LUN; there&#39;s a BYTE column that&#39;s stored in a multi-chunk blobspace; the chunks for the blobspace are distributed across all six LUNs, but no single chunk spans more than one LUN.&amp;nbsp; And both of the indexes are fragmented six ways, with one fragment on each LUN.&amp;nbsp; Three of these batch jobs are run simultaneously, one for each table fragment.&lt;br /&gt;&lt;br /&gt;In both cases, there&#39;s a rootdbs, a dbspace for the physical log, and two logical log dbspaces.&amp;nbsp; All four of these dbspaces are on separate LUNs from one another, and the logical logs alternate between the two log dbspaces (so that log #2 is not in the same dbspace as log #1).&lt;br /&gt;&lt;br /&gt;So place your bets! Which storage configuration will work best for the OLTP test? Which will work best for the batch test?&amp;nbsp; I&#39;m curious to hear what you think.&amp;nbsp; I&#39;ll post the complete results when I have them.&amp;nbsp; Feel free to ask questions if you have any.&lt;br /&gt;&lt;br /&gt;* - This will also be a good test to see if anybody&#39;s actually bothering to read these posts. :)&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2016/08/audience-participation-benchmark-edition.html</link><author>noreply@blogger.com (TGirsch)</author><thr:total>5</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-7392367276191866991</guid><pubDate>Fri, 12 Aug 2016 16:16:00 +0000</pubDate><atom:updated>2016-08-12T11:16:05.750-05:00</atom:updated><title>Public Service Announcement: Smart BLOBs Still Suck</title><description>The last time I tried to mess around with Smart BLOBs was probably in 2007 or 2008.&amp;nbsp; I found that they were buggy and excruciatingly slow.&amp;nbsp; But that was &lt;i&gt;years&lt;/i&gt; ago, most likely IDS 10.0.&amp;nbsp; I&#39;ve got a pretty good use case for them now, and I&#39;m using the latest, greatest IDS 12.10.FC7, so I thought I&#39;d have another look at them.&lt;br /&gt;&lt;br /&gt;They&#39;re still buggy and excruciatingly slow.&lt;br /&gt;&lt;br /&gt;Buggy how? I ran out of space in the main dbspace while trying to populate a test table in a non-logged DB with non-logging Smart BLOBs. The result is that the Smart BLOBs appear to have been created with a ref count of 0, and I was left with records that I couldn&#39;t delete, and tables I couldn&#39;t drop.&amp;nbsp; And this is apparently a common enough occurrence that there&#39;s an option for onspaces that allegedly deals with it.&amp;nbsp; (Since I was only testing, I found it easier just to restore the engine to its baseline.)&lt;br /&gt;&lt;br /&gt;But maybe that was a fluke; just don&#39;t run out of space, or at least not in those circumstances, and it should be fine.&amp;nbsp; Which brings us to performance.&lt;br /&gt;&lt;br /&gt;Excruciatingly slow how?&amp;nbsp; I tested the same purge process using the BYTE data type and the BLOB data type.&amp;nbsp; With BLOB, the process took nearly three &lt;i&gt;times&lt;/i&gt; as long.&amp;nbsp; With BYTE, a 3 million row purge took just over 13 minutes, on average.&amp;nbsp; With BLOB, over 36 minutes.&lt;br /&gt;&lt;br /&gt;Perhaps others of you have had better luck, but my experience with Smart BLOBs was bad then, and it&#39;s still bad now.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2016/08/public-service-announcement-smart-blobs.html</link><author>noreply@blogger.com (TGirsch)</author><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-3015984814832221812</guid><pubDate>Thu, 21 Jul 2016 14:37:00 +0000</pubDate><atom:updated>2016-07-21T09:40:21.756-05:00</atom:updated><title>Major Linux I/O Bug? SPOLER: No</title><description>Alternate title: &lt;b&gt;Betteridge&#39;s Law Holds!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Last week, I &lt;a href=&quot;http://www.informix-dba.com/2016/07/major-linux-io-bug.html&quot;&gt;posted&lt;/a&gt; on what I thought was an I/O bug in RHEL 7 and CentOS 7. I&#39;ve now done enough testing to eliminate this possibility.&amp;nbsp; So, as promised:&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/OjYoNL4g5Vg&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt; &lt;br /&gt;So what was happening, then, that led me to get such drastically different results?&lt;br /&gt;&lt;br /&gt;First, and most importantly, as I noted in an update to the prior post, one system was using SSD and the other was using spinning disk.&amp;nbsp; That accounted for the large bulk of the difference.&amp;nbsp; It still leaves the somewhat unsolved mystery of my production performance problems that coincided roughly in time with when the OS was updated (which is what led me down that rabbit hole in the first place).&lt;br /&gt;&lt;br /&gt;But there may also have been other configuration changes made around that time that accounted for this.&amp;nbsp; In preliminary testing, I&#39;ve found that I get better performance by turning kernel asynchronous I/O &lt;i&gt;off&lt;/i&gt;, contrary to conventional wisdom (and to what I&#39;ve found on other platforms). I&#39;ve coupled this with also disabling DIRECT_IO, though I believe the latter may be a bad thing: it may be that the performance is buoyed by caching that&#39;s going on at the OS level, which would mean that data hasn&#39;t really been committed to disk even though the DB engine believes that it has. By making these two changes, I&#39;ve gotten the performance on the production system back close to previous (good) levels, at least for the time being.&lt;br /&gt;&lt;br /&gt;But anyway, false alarm, and egg on my face. &lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2016/07/major-linux-io-bug-spoler-no.html</link><author>noreply@blogger.com (TGirsch)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/OjYoNL4g5Vg/default.jpg" height="72" width="72"/><thr:total>98</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-6106630946107920706</guid><pubDate>Fri, 15 Jul 2016 12:14:00 +0000</pubDate><atom:updated>2016-07-19T13:37:55.698-05:00</atom:updated><title>Major Linux I/O Bug? -- UPDATED 2016-07-19</title><description>&lt;b&gt;Update 19 Jul 2016:&lt;/b&gt; I still believe there&#39;s an issue here, but I&#39;ve got reason to believe my tests were not as apples-to-apples as I&#39;d originally thought. So I&#39;m re-engineering the tests and trying again to get updated numbers.&amp;nbsp; I&#39;m also checking to see if I can replicate results with Informix completely removed from the mix, doing some testing with simple dd.&lt;br /&gt;&lt;br /&gt;It is also possible that there&#39;s no problem at all, and I may have to cue Emily Litella.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Further Update:&lt;/b&gt; Not only were apples not apples, they were also not oranges or Buicks. Turns out a big part of the reason I saw the huge discrepancies was because I had SSD on one system and spinning disk on another.&amp;nbsp; Needless to say, the numbers from the original post are meaningless because of that mistake. But there&#39;s still the mystery of the performance degradation in  production that coincides with when updates were installed to CentOS.&lt;br /&gt;&lt;br /&gt;As a sanity check, I re-ran the same test on various platforms and compared those results to one another and to results I got back in September when I ran a similar battery.&amp;nbsp; In every case, the results were better today than in September EXCEPT on RHEL/CentOS, where they were considerably worse than they had been in September. AIX on old hardware (with several storage configurations) smoked all combinations on Linux. So I&#39;m thoroughly confused, and still researching.&lt;br /&gt;&lt;b&gt;End Update&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I believe I&#39;ve stumbled upon a major bug in the Linux kernel I/O subsystem.&amp;nbsp; I&#39;ve been working on testing newly-acquired hardware to see how it compares against the hardware we&#39;re replacing, and in my initial tests, the results I was getting were terrible.&amp;nbsp; Read performance looked pretty good, but write performance was abysmal.&lt;br /&gt;&lt;br /&gt;At first, I was blaming it on the new DAS, thinking that there must be some kind of setting causing it to heavily prioritize reads over writes.&amp;nbsp; I&#39;d run the same test on AIX machines, and those tests lost on read performance but won easily on write performance.&amp;nbsp; Then, as a sanity check, I decided to do the same test on a VM, and got the same abysmal results.&amp;nbsp; I&#39;d run the test on an identically-configured VM before, several months ago, and got &lt;i&gt;much&lt;/i&gt; different results, so that tripped my inner, &quot;Hey! Wait a minute!&quot;&lt;br /&gt;&lt;br /&gt;This reminded me of a lingering performance issue that we&#39;ve got on a production Linux VM that seems to have started back in mid-May. So I went onto the VM in question and ran &quot;yum history.&quot; That shows that I had done a &quot;yum update&quot; back on May 18, right about the time performance issues started to be reported. &quot;Aha!&quot; I thought.&amp;nbsp; I&#39;ve got a culprit now.&amp;nbsp; In setting up the new hosts, I was doing a &quot;yum update&quot; almost immediately.&amp;nbsp; So what happens if I re-install the system and &lt;i&gt;don&#39;t&lt;/i&gt; install updates?&lt;br /&gt;&lt;br /&gt;You can guess where this is going: performance looks &lt;i&gt;fantastic&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;I&#39;m still trying to narrow it down.&amp;nbsp; My hope is to figure out which particular package update causes the problem, and I&#39;ll report back if/when I find it.&amp;nbsp; So far, here&#39;s what I can tell you:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The problem replicates on both RHEL 7 and CentOS 7.&lt;/li&gt;&lt;li&gt;If you install cleanly from the latest media (as of about 2 weeks ago), I/O performance looks great. (Kernel release: &lt;b&gt;3.10.0-327.el7.x86_64&lt;/b&gt;)&lt;/li&gt;&lt;li&gt;If you run &quot;yum update&quot; then after the updates have installed, I/O performance will go down the crapper: read performance drops by a little more than 10%; write performance drops by nearly &lt;b&gt;80%!&lt;/b&gt; (Kernel releases &lt;b&gt;3.10.0-327.18.2.el7.x86_64&lt;/b&gt; and &lt;b&gt;3.10.0-327.22.2.el7.x86_64&lt;/b&gt;)&lt;/li&gt;&lt;li&gt;On systems, VMs where the updates have been installed, disabling kernel asynchronous I/O (KAIOOFF=1) seems to help, bringing read performance back to what I&#39;d expect, and getting back about half the difference on write performance.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Note: the test I&#39;ve been running is a large, single-threaded purge, starting from the same baseline and purging exactly the same records.&amp;nbsp; To isolate read performance, I have a version of the purge that scans the table to find the records to be purged but doesn&#39;t do the actual purging.&amp;nbsp; Here are the results of those tests:&lt;br /&gt;&lt;br /&gt;Without updates, read-only: 18182.94 rows/second &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;With updates, read-only: 16170.75 rows/second&lt;br /&gt;With updates, read-only, KAIOOFF=1: 18,389.99 rows/second&lt;br /&gt;&lt;br /&gt;Without updates, full purge: 2010.49 rows/second&lt;br /&gt;With updates, full purge: 438.46 rows/second&lt;br /&gt;With updates, full purge, KAIOOFF=1: 1125.58 rows/second&lt;br /&gt;&lt;br /&gt;[Still to test: Without updates, KAIOOFF=1]&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2016/07/major-linux-io-bug.html</link><author>noreply@blogger.com (TGirsch)</author><thr:total>6</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-523700634921435816</guid><pubDate>Tue, 10 May 2016 19:34:00 +0000</pubDate><atom:updated>2016-05-10T14:34:48.950-05:00</atom:updated><title>Is This Thing On?</title><description>In a move that should make all of you question Andrew&#39;s judgment, he&#39;s invited me to also contribute to the Informix DBA blog.&amp;nbsp; So now you&#39;ll get erratic posting from two of the three fastest* Informix DBAs in the world.&lt;br /&gt;&lt;br /&gt;Hopefully I&#39;ll be able to contribute something of value besides bad humor.&lt;br /&gt;&lt;br /&gt;* - Fastest according to one extremely arbitrary contest several years and versions ago, in which only a small fraction of the world&#39;s Informix DBAs actually participated.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2016/05/is-this-thing-on.html</link><author>noreply@blogger.com (TGirsch)</author><thr:total>12</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-1707085838339106793</guid><pubDate>Thu, 29 Jan 2015 21:37:00 +0000</pubDate><atom:updated>2015-01-29T15:37:51.228-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">data page</category><category domain="http://www.blogger.com/atom/ns#">IPA</category><category domain="http://www.blogger.com/atom/ns#">slot entry</category><category domain="http://www.blogger.com/atom/ns#">slot table</category><title>Resolving In Place Alters - Part 4, The Slot Table</title><description>By the end of&amp;nbsp;&lt;a href=&quot;http://www.informix-dba.com/2015/01/resolving-in-place-alters-part-3.html&quot; target=&quot;_blank&quot;&gt;Resolving In Place Alters, Part 3&lt;/a&gt;&amp;nbsp;I was able to read the raw data pages that belong to the table with pending IPAs, but I wasn&#39;t able to see if a data page had a pending IPA or not. In this installment I will show you how I solved that problem using what I know about the Informix Data Page structure and the structure of my table before and after the in place alter was performed.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Anatomy of the Informix Data Page&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;When Informix stores data on disk, it doesn&#39;t just write your row data. It also writes some &quot;housekeeping&quot; data at the beginning of the page and at the end of the page that help the engine to know what actually is stored in this data page.&lt;br /&gt;&lt;br /&gt;The first 24 bytes of a page contain the page header with all kinds of information that you&#39;re going to have a hard time finding documentation about. The last N bytes of a data page contain a timestamp and the slot table, which you may have better luck finding some documentation on. In between the page header and page footer (slot table + timestamp) you&#39;ll find your actual data. We will need information from each of the 3 parts of the data page.&lt;br /&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Slot Table&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;The slot table defines where each row in the page starts and how long the row is. When the engine needs to get the data for a row stored in slot #3 on a data page it goes to the slot #3 slot table entry, grabs the starting position of the data in the page and the length of the row then reads the appropriate number of bytes (defined by the length of the row in the slot table) that start at the starting position.&lt;br /&gt;&lt;br /&gt;For a 2K page, slot entry #1 is always stored in byte offsets 2040 to 2043, slot entry #2 is always stored in byte offsets 2036 to 2039, slot entry #3 is always stored in byte offsets 2032 to 2035, and so on and so forth.&lt;br /&gt;&lt;br /&gt;Here is (hopefully) a better way to visualize it:&lt;br /&gt;&lt;pre&gt;Byte Offset   Hex Data   Purpose&lt;br /&gt;2032          b3009b00   Slot #3&lt;br /&gt;2036          00009700   Slot #2&lt;br /&gt;2040          18009b00   Slot #1&lt;br /&gt;2044          099f9e6a   Page Timestamp&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Extracting Row Start and Length From Slot Entry&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;In the above example, slot entry #3 contains the following 4 bytes of data: b3009b00. The offset into the page that this row starts at is contained in the first 2 bytes and the length of the row is stored in the last 2 bytes. So, the row in slot entry #3 begins at byte offset 0x00b3 (converted from little endian) or byte 179 of the data page and the length of the row is 0x009b or 155 bytes.&lt;br /&gt;&lt;br /&gt;If I were ready to get the raw data that lives in this row from sysrawdsk I could because I know where the raw data starts and how much raw data to read from the starting position. However, I&#39;m not ready to do this yet.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How Many Slot Entries Are There?&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;When the engine adds a row to a brand new and never before used data page the number of slot entries will be 1. When another row is added the number of slot entries will be 2. What happens when you delete a row from the page? The number of slot entries remains 2, but the starting position of the deleted row in the slot entry will be zero&#39;d out with &#39;0000&#39; to indicate the row has been deleted, but there still are 2 slot entries.&lt;br /&gt;&lt;br /&gt;Since we will be reading data from the slot table it is important that we know how many slot entries there are so we don&#39;t accidentally read garbage. This useful byte of information is stored at byte offset 8 in the data page in the page header.&lt;br /&gt;&lt;br /&gt;See for yourself:&lt;br /&gt;&lt;pre&gt;select &lt;br /&gt;   hexdata,&lt;br /&gt;   hexdata[19, 20] slots_hex, &lt;br /&gt;   (&#39;0x&#39; || hexdata[19, 20])::integer slots_int &lt;br /&gt;from &lt;br /&gt;   sysrawdsk &lt;br /&gt;where &lt;br /&gt;   pg_chunk = 4 and &lt;br /&gt;   pg_offset = 14893989 and &lt;br /&gt;   offset = 0;&lt;br /&gt;&lt;br /&gt;hexdata                                  slots_hex   slots_int&lt;br /&gt;&lt;br /&gt;a543e300 0400d5b6 0d000148 5c076c00      0d                 13&lt;br /&gt;&lt;br /&gt;&amp;gt;oncheck -pP 4 14893989&lt;br /&gt;&lt;br /&gt;addr             stamp    chksum nslots flag type         frptr frcnt next     prev&lt;br /&gt;4:14893989       1788780297 b6d5   13     4801 DATA         1884  108   1000000  0&lt;br /&gt;        slot ptr   len   flg&lt;br /&gt;        1    24    155   0&lt;br /&gt;        3    179   155   0&lt;br /&gt;        4    334   155   0&lt;br /&gt;        5    489   155   0&lt;br /&gt;        6    644   155   0&lt;br /&gt;        7    799   155   0&lt;br /&gt;        8    954   155   0&lt;br /&gt;        9    1109  155   0&lt;br /&gt;        10   1264  155   0&lt;br /&gt;        11   1419  155   0&lt;br /&gt;        12   1574  155   0&lt;br /&gt;        13   1729  155   0&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the oncheck output you can see that there are 13 slot entries in the slot table (nslots). You will also notice that only 12 slot entries are described because slot #2 contains a row that has been deleted. 12 rows on the page, but 13 slot entries in the slot table.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How To Tell If a Page Has a Pending IPA&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;The schema change I made that resulted in pending in place alters was adding an integer field to the end of my table. This changed my row size from 151 bytes to 155 bytes (remember, no varchars so my row length is fixed). I can use this knowledge to look at my slot table and see if the IPA has been resolved (row length of 155 in the slot table) or if the IPA is pending (row length of 151 in the slot table).&lt;br /&gt;&lt;br /&gt;Here is the logic:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Current slot entry we are examining is slot entry #1, number of slot entries checked is 0&lt;/li&gt;&lt;li&gt;If the number of slot entries we have checked equals the number of slot entries in the page header stop looking at slot entries and do nothing with this data page&lt;/li&gt;&lt;li&gt;Extract the row length and row starting position from the current slot entry&lt;/li&gt;&lt;li&gt;If the row starting position is &#39;0000&#39; this row has been deleted. Increment the current slot entry we are looking at and go back to step 2&lt;/li&gt;&lt;li&gt;If the row length is &#39;9b00&#39; (aka 155 bytes) then this row has already been updated with the new row format. Stop looking at slot entries and do nothing with this data page&lt;/li&gt;&lt;li&gt;If the row length is &#39;9700&#39; (aka 151 bytes) then this row has not been updated with the new row format. Stop looking at slot entries and do something with this data page to resolve the IPA&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;Rinse and repeat for all data pages.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Next time I will explain how I extracted the primary key data from the raw data and used this to force an update to the data page I&#39;m examining and resolve the IPA.&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you are travelling to &lt;a href=&quot;http://www.iiug2015.org/&quot; target=&quot;_blank&quot;&gt;IIUG2015&lt;/a&gt; this year, pick up some of these luggage tags to keep someone from accidentally taking your luggage at the airport. &lt;br /&gt;&lt;div align=&quot;center&quot;&gt;&lt;a href=&quot;http://www.amazon.com/gp/product/B008A0SZV8/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B008A0SZV8&amp;amp;linkCode=as2&amp;amp;tag=stufibot-20&amp;amp;linkId=WTQPH74A2GZOHIJW&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;amp;ASIN=B008A0SZV8&amp;amp;Format=_SL250_&amp;amp;ID=AsinImage&amp;amp;MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;WS=1&amp;amp;tag=stufibot-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://ir-na.amazon-adsystem.com/e/ir?t=stufibot-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=B008A0SZV8&quot; height=&quot;1&quot; style=&quot;border: none !important; margin: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2015/01/resolving-in-place-alters-part-4-slot.html</link><author>noreply@blogger.com (Andrew Ford)</author><thr:total>23</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-1195877402840478532</guid><pubDate>Fri, 23 Jan 2015 22:37:00 +0000</pubDate><atom:updated>2015-01-23T16:37:47.107-06:00</atom:updated><title>Resolving In Place Alters - Part 3</title><description>In&amp;nbsp;&lt;a href=&quot;http://www.informix-dba.com/2015/01/resolving-in-place-alters-part-2.html&quot; target=&quot;_blank&quot;&gt;Resolving In Place Alters - Part 2&lt;/a&gt;&amp;nbsp;I decided that I want to try to identify only the pages with a pending IPA and only &quot;fix&quot; those data pages in an attempt to speed up the resolving of IPAs and limit the work load added to the system when doing so.&lt;br /&gt;&lt;br /&gt;To do this, I will need to read the actual data pages stored on disk and use information in the page header and slot table to determine if a page needs to be fixed. More on this in the next blog, today I just want to talk about how to read in the raw data pages.&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;As far as I know, I only have 2 good options. Bypass the engine and open and read the data in the chunk directly or use the sysmaster:sysrawdsk table. I tried both options and did not notice a performance difference either way, so I decided to use sysrawdsk simply because it made things easier since I can use SQL to query and get the raw data pages.&lt;br /&gt;&lt;br /&gt;sysmaster:sysrawdsk looks like this (for those concerned about the Internal Use Only warning, just don&#39;t do any of this outside and you&#39;ll be fine):&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;    create table informix.sysrawdsk             { Internal Use Only             }&lt;br /&gt;        (&lt;br /&gt;        pg_chunk        integer,        { physical page address - chunk }&lt;br /&gt;        pg_offset       integer,        { physical page address - offset}&lt;br /&gt;        offset          smallint,       { bytes into page               }&lt;br /&gt;        loc             char(23),       { location representation       }&lt;br /&gt;        hexdata         char(40),       { 16 bytes hexdumped from offset}&lt;br /&gt;        ascdata         char(16)        { 16 bytes ascii-dumped         }&lt;br /&gt;        );&lt;br /&gt;    create unique index informix.sysrawdskidx on sysrawdsk (pg_chunk, pg_offset, offset);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Each row in the table represents 16 bytes of raw data. For example:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;select &lt;br /&gt;   hexdata&lt;br /&gt;from&lt;br /&gt;   sysrawdsk &lt;br /&gt;where &lt;br /&gt;   pg_chunk = 4 and &lt;br /&gt;   pg_offset = 1000 and &lt;br /&gt;   offset = 64;&lt;br /&gt;&lt;br /&gt;hexdata&lt;br /&gt;&lt;br /&gt;34313037 30353632 36302020 20202020&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Gives me the 16 bytes of data (in hex) that starts on the 64th byte of page 1000 in chunk 4.&lt;br /&gt;&lt;br /&gt;We are making progress. Now that I can query the raw data to use to my advantage later, I need to figure out how to find the pages that belong to the table I&#39;m trying to fix. sysmaster to the rescue yet again, this time in the form of the sysextents table.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;select&lt;br /&gt;   chunk,&lt;br /&gt;   offset,&lt;br /&gt;   size&lt;br /&gt;from&lt;br /&gt;   sysextents&lt;br /&gt;where&lt;br /&gt;   dbsname = &quot;mydb&quot; and&lt;br /&gt;   tabname = &quot;mytab&quot;&lt;br /&gt;order by&lt;br /&gt;   offset asc;&lt;br /&gt;&lt;br /&gt;      chunk      offset        size&lt;br /&gt;&lt;br /&gt;          4      851706       77423&lt;br /&gt;          4      929129       77423&lt;br /&gt;          4     1006552       77423&lt;br /&gt;          4     1083975       77423&lt;br /&gt;          4     1161398       77423&lt;br /&gt;          4     1238821       77423&lt;br /&gt;          4     1316244       77423&lt;br /&gt;          4     1393667       77423&lt;br /&gt;          4     1471090       77423&lt;br /&gt;          4     1548513       77423&lt;br /&gt;          4     1625936       77423&lt;br /&gt;          4     1703535      524288&lt;br /&gt;          4     2227823      524288&lt;br /&gt;          4     2752111      524288&lt;br /&gt;          4     3276399      524288&lt;br /&gt;          4     3800687      524288&lt;br /&gt;          4     4324975      524288&lt;br /&gt;          4     4849263      524288&lt;br /&gt;          4     5373551      524288&lt;br /&gt;          ....&lt;br /&gt;&lt;/pre&gt;In review, we now have:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;A way to read the raw data pages from sysrawdsk&lt;/li&gt;&lt;li&gt;A way to find the pages that belong to our table&lt;/li&gt;&lt;/ol&gt;Now we need to find the data pages in these extents, back to good old sysmaster.&lt;br /&gt;&lt;br /&gt;The sysmaster:sysptnbit table holds the partition bit maps, this data will tell us if a page we are looking at is a &quot;Data Page with Room for another Row&quot; (bitmap value of 4), a &quot;Data Page without Room for another Row&quot; (bitmap value of 12) or some page type we don&#39;t care about. &lt;b&gt;Now would be a good time to mention that my row size is fixed with no variable length fields and one row fits completey on a page so there are no remainder pages.&lt;/b&gt;&amp;nbsp;If you have either of these conditions, well things are going to be a little more difficult for you. &lt;br /&gt;&lt;pre&gt;{ Partition Bit Maps }&lt;br /&gt;    create table informix.sysptnbit&lt;br /&gt;        (&lt;br /&gt;        pb_partnum      integer,        { partnum for this partition    }&lt;br /&gt;        pb_pagenum      integer,        { logical pagenum represented   }&lt;br /&gt;        pb_bitmap       integer         { bitmap value for page         }&lt;br /&gt;        );&lt;br /&gt;    create unique index informix.sysptnbitidx on sysptnbit (pb_partnum, pb_pagenum);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here things get a little annoying for us. The data in sysptnbit is referenced by logical page and the pages we are looking at in sysrawdsk are referenced by physical page. If you need a refresher course on how to convert a physical page reference (chunk and offset) to a logical page reference (partnum and page number) then here is my best attempt...&lt;br /&gt;&lt;br /&gt;Logical page numbers in a partition are sequential starting with page 0 in the first extent. The second page in the first extent is page number 1, the third page in the first extent is page number 2 and so on and so forth. If the first extent has 1000 pages, the last page in the first extent will be logical page number 999 and the first page in the second extent will be logical page number 1000. The second page in the second extent will be page number 1001, the third page in the second extent will be 1002 and so on and so forth. We can use this logic and the sysmaster:sysptnext table to find the logical page number for any physical page.&lt;br /&gt;&lt;br /&gt;Here is an example with chunk 4, page 5373552. &amp;nbsp; &lt;br /&gt;&lt;br /&gt;Step 1 - Find the first page of the extent that this page belongs to&lt;br /&gt;&lt;pre&gt;select&lt;br /&gt;   offset&lt;br /&gt;from&lt;br /&gt;   sysextents&lt;br /&gt;where&lt;br /&gt;   chunk = 4 and&lt;br /&gt;   5373552 between offset and offset + size;&lt;br /&gt;   &lt;br /&gt;     offset&lt;br /&gt;&lt;br /&gt;    5373551&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Step 2 - Find the partnum and extent number that maps to this extent &lt;br /&gt;&lt;pre&gt;select&lt;br /&gt;   pe_partnum,&lt;br /&gt;   pe_extnum&lt;br /&gt;from&lt;br /&gt;   sysptnext&lt;br /&gt;where&lt;br /&gt;   pe_chunk = 4 and&lt;br /&gt;   pe_offset = 5373551; -- first page of the extent that page 5373552 of chunk 4 belongs to&lt;br /&gt;&lt;br /&gt; pe_partnum pe_extnum&lt;br /&gt;&lt;br /&gt;    4194317         1&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Step 3 - Find the total number of pages that belong to the extents created before this extent &lt;br /&gt;&lt;pre&gt;select&lt;br /&gt;   nvl(sum(pe_size), 0) pages&lt;br /&gt;from&lt;br /&gt;   sysptnext&lt;br /&gt;where&lt;br /&gt;   pe_chunk = 4 and&lt;br /&gt;   pe_partnum = 4194317 and&lt;br /&gt;   pe_extnum &amp;lt; 1;&lt;br /&gt;&lt;br /&gt;           pages&lt;br /&gt;&lt;br /&gt;           77423&lt;br /&gt;&lt;/pre&gt;Step 4 - We now know the logical page number for the first page of the extent that our page belongs to, just need to calculate our page number &lt;br /&gt;&lt;pre&gt;Our Logical Page Number = 77423 + (5373552 - 5373551) = 77424&lt;/pre&gt;&lt;br /&gt;Taking our new found logical page address (partnum and pagenum) we can query sysptnbit and see if this is a page we are interested in (bitmap value 4 or 12)&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;select&lt;br /&gt;   pb_bitmap&lt;br /&gt;from&lt;br /&gt;   sysptnbit&lt;br /&gt;where&lt;br /&gt;   pb_partnum = 4194317 and&lt;br /&gt;   pb_pagenum = 77424;&lt;br /&gt;&lt;br /&gt;  pb_bitmap&lt;br /&gt;&lt;br /&gt;         12&lt;br /&gt;&lt;/pre&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://www.american-buddha.com/ghostbust.78d.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://www.american-buddha.com/ghostbust.78d.gif&quot; height=&quot;144&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;One last thing to note before I conclude Part 3, if no bitmap row had been found then I would know that I am at the end of valid data for this extent and can stop looking at the pages it contains and move on to the next extent.&lt;br /&gt;&lt;br /&gt;Next time - Part 4: How to figure out if the data page I just found has a pending IPA or not.&lt;br /&gt;&lt;br /&gt;Now, have some ads. I insist.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.amazon.com/gp/product/B00NW550KU/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00NW550KU&amp;linkCode=as2&amp;tag=stufibot-20&amp;linkId=T5KKYDXRX3THSMJY&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B00NW550KU&amp;Format=_SL250_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=stufibot-20&quot; &gt;&lt;/a&gt;&lt;img src=&quot;http://ir-na.amazon-adsystem.com/e/ir?t=stufibot-20&amp;l=as2&amp;o=1&amp;a=B00NW550KU&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;&lt;a href=&quot;http://www.amazon.com/gp/product/B00BCQ4D9A/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00BCQ4D9A&amp;linkCode=as2&amp;tag=stufibot-20&amp;linkId=USLNUL3RJHQSTZNE&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B00BCQ4D9A&amp;Format=_SL250_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=stufibot-20&quot; &gt;&lt;/a&gt;&lt;img src=&quot;http://ir-na.amazon-adsystem.com/e/ir?t=stufibot-20&amp;l=as2&amp;o=1&amp;a=B00BCQ4D9A&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;&lt;a href=&quot;http://www.amazon.com/gp/product/B00O8CFUDS/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00O8CFUDS&amp;linkCode=as2&amp;tag=stufibot-20&amp;linkId=AHX5ZQLXVYT4247P&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B00O8CFUDS&amp;Format=_SL250_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=stufibot-20&quot; &gt;&lt;/a&gt;&lt;img src=&quot;http://ir-na.amazon-adsystem.com/e/ir?t=stufibot-20&amp;l=as2&amp;o=1&amp;a=B00O8CFUDS&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;&lt;a href=&quot;http://www.amazon.com/gp/product/B0085MQPSG/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B0085MQPSG&amp;linkCode=as2&amp;tag=stufibot-20&amp;linkId=FKFRXIS4OJLC76NM&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=B0085MQPSG&amp;Format=_SL250_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=stufibot-20&quot; &gt;&lt;/a&gt;&lt;img src=&quot;http://ir-na.amazon-adsystem.com/e/ir?t=stufibot-20&amp;l=as2&amp;o=1&amp;a=B0085MQPSG&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt; &lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2015/01/resolving-in-place-alters-part-3.html</link><author>noreply@blogger.com (Andrew Ford)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-8507888155112750553</guid><pubDate>Thu, 15 Jan 2015 23:43:00 +0000</pubDate><atom:updated>2015-01-23T16:38:26.214-06:00</atom:updated><title>Resolving In Place Alters - Part 2</title><description>In&amp;nbsp;&lt;a href=&quot;http://www.informix-dba.com/2014/11/im-back-did-you-think-i-was-gone-forever.html&quot;&gt;Part 1&lt;/a&gt;&amp;nbsp;I talked about how I knew that the prescribed method of resolving the pending in place alters in my large table by simply issuing a single large dummy update statement to update each row won&#39;t work for large tables. There are just too many problems with long transactions, locks and excessive I/O that can trash the engine.&lt;br /&gt;&lt;br /&gt;I decided the first thing I would try would be to update every row in the table, but do it in multiple transactions to avoid long transactions and holding on to a lot of locks. Nothing too interesting, pretty standard stuff really. The logic looks like this:&lt;br /&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;pre&gt;set isolation dirty read;&lt;br /&gt;select {+full (large_table)} primary_key from large_table;&lt;br /&gt;&lt;br /&gt;updated = 0&lt;br /&gt;for each row:&lt;br /&gt;   update large_table set primary_key = primary_key where primary_key = row.primary_key&lt;br /&gt;   updated = updated + 1&lt;br /&gt;&lt;br /&gt;   if updated mod 1000 == 0:&lt;br /&gt;      commit work;&lt;br /&gt;&lt;br /&gt;if updated mode 1000 != 0:&lt;br /&gt;   commit work;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Next I was able to find an SQL that could tell me how many pending in place alters a table had remaining. I used this information to stop updating when all of the pending in place alters had been resolved. Not the most exciting thing in the world, but it could be helpful if you have a bunch of IPAs only at the beginning of the table. I could see this happening with some kind of transaction table that get added to, but never updated. Anyway, that SQL looks like this:&lt;br /&gt;&lt;pre&gt;select&lt;br /&gt;   nvl(sum(pta_totpgs), 0)::integer pages&lt;br /&gt;from&lt;br /&gt;   sysmaster:sysactptnhdr h,&lt;br /&gt;   sysmaster:systabnames t&lt;br /&gt;where&lt;br /&gt;   h.partnum = t.partnum and&lt;br /&gt;   t.dbsname = &quot;dbname&quot; and&lt;br /&gt;   t.tabname = &quot;tablename&quot;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The final and most interesting thing to come out of this failed experiment was throttling the updates if the server was getting busy. Before allowing the update loop to start a new transaction I checked to make sure the following conditions were met:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;No Cleaner threads running&lt;/li&gt;&lt;li&gt;BTScanner is not scanning an index&lt;/li&gt;&lt;li&gt;No thread waiting on a log buffer&lt;/li&gt;&lt;li&gt;No backup (logical log or level 0, 1, 2) is running&lt;/li&gt;&lt;li&gt;Update Statistics is not running&lt;/li&gt;&lt;li&gt;The load average is below a certain threshold&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Mostly we are trying to avoid overloading the I/O with these checks and I would pause all work until all of these conditions are met. Sure, I want to resolve these IPAs as quickly as possible, but not at the expense of overwhelming the engine and impacting production.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As you might of guessed the performance was crap. Apparently it takes a long time to update a billion rows one by one in a way that plays nice with the other SQLs. Even if I decided to not play nice and disable the throttling I averaged a rate of 547.3 rows updated per second, or just over 21 days of running non-stop before it was complete. Brute force was just not going to cut it and I&#39;m doing a lot of work that doesn&#39;t need to be done. I don&#39;t need to update pages that don&#39;t have pending IPAs and I don&#39;t need to update every row on a page to fix pages with pending IPAs.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I wanted to find a better way. Specifically identifying only the data pages that have pending in place alters AND only updating the minimal number of rows to force the page to be rewritten.&lt;br /&gt;&lt;br /&gt;In &lt;a href=&quot;http://www.informix-dba.com/2015/01/resolving-in-place-alters-part-3.html&quot; target=&quot;_blank&quot;&gt;Part 3&lt;/a&gt; I&#39;ll talk about reading the data pages directly from disk and how I plan to use this to my advantage. In the mean time, here is an advertisement to help keep the lights on.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align=&quot;center&quot;&gt;For easier reading of &lt;a href=&quot;https://www.blogger.com/www.informix-dba.com&quot;&gt;informix-dba.com&lt;/a&gt; while on the can. &lt;a href=&quot;http://www.amazon.com/gp/product/B00AQT653G/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B00AQT653G&amp;amp;linkCode=as2&amp;amp;tag=stufibot-20&amp;amp;linkId=CSDDUGRRU7QVKLAM&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;amp;ASIN=B00AQT653G&amp;amp;Format=_SL250_&amp;amp;ID=AsinImage&amp;amp;MarketPlace=US&amp;amp;ServiceVersion=20070822&amp;amp;WS=1&amp;amp;tag=stufibot-20&quot; /&gt;&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://ir-na.amazon-adsystem.com/e/ir?t=stufibot-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=B00AQT653G&quot; height=&quot;1&quot; style=&quot;border: none !important; margin: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2015/01/resolving-in-place-alters-part-2.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-2477928549854926207</guid><pubDate>Fri, 21 Nov 2014 20:08:00 +0000</pubDate><atom:updated>2014-11-21T14:08:49.144-06:00</atom:updated><title>I&#39;m Back! Did You Think I was Gone Forever?</title><description>&lt;b&gt;I Sure Did Miss You&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Truth be told, I just haven&#39;t had much to write about until now. I haven&#39;t been doing much of anything interesting with Informix. Sure, I&#39;ve been doing the day to day Informix DBA stuff, but nothing blog worthy. Mostly I&#39;ve been working on some software development, data mining and business optimization projects for my company. But that all changed this week.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Catalyst&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;I want to upgrade to v12.1, but I&#39;m a big fat chicken and I&#39;ve got a pending in place alter on my most importantest of important tables. The one that holds account information and balances for over 1 billion accounts and the manual tells me I should probably resolve all of my IPA&#39;s before performing an in place upgrade. Could I take a chance and upgrade the engine without following the manual&#39;s advice? Sure. Have I done it before without problems? Yeah, but I&#39;m not proud of it and they weren&#39;t on our most precious table, so this time I&#39;m going to follow the rules.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Part 1 - What to Expect and What I Knew Wouldn&#39;t Work&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;This will be a 89 part series (give or take a few) on how I accomplished this task without any downtime, without killing performance, without locking up the table and most importantly without updating every gosh darned one of those 1 billion rows like the manuals suggest you do. (Ok, full disclosure, I&#39;m still working on the last little bit, but I think I&#39;ve got this nut cracked.)&lt;br /&gt;&lt;br /&gt;I have submitted a proposal for &lt;a href=&quot;http://www.iiug2015.org/&quot;&gt;IIUG2015&lt;/a&gt;&amp;nbsp;on this topic, so if you don&#39;t feel like reading you can just wait for the movie. You will have to buy a ticket and they will be on sale soon. If you too would like to present something at IIUG2015 and receive a complimentary pass, there is still time to&amp;nbsp;&lt;a href=&quot;http://www.iiug2015.org/speakers/&quot;&gt;submit a proposal&lt;/a&gt;. This is the 20th anniversary of the first Informix conference in Chicago and it will be fun and educational as always.&lt;br /&gt;&lt;br /&gt;What I knew wouldn&#39;t work - The manuals seem to assume we are all operating with tables with only a handful of rows and their simple solution to resolving IPA&#39;s is to just dummy update every row in the table.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;update your_tiny_table set your_field = your_field where 1 = 1; &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Well, we all know that will cause havoc on a system if you&#39;re updating a table with any substantial size. Locks, long transactions, evil I/O, oh my. There has to be a better way and there is. Next time I&#39;ll show you the first thing I tried. (Spoiler alert, it didn&#39;t work either.)&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2014/11/im-back-did-you-think-i-was-gone-forever.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>5</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-3655273193372412408</guid><pubDate>Fri, 21 Mar 2014 13:06:00 +0000</pubDate><atom:updated>2014-03-21T09:29:33.452-05:00</atom:updated><title>Eric Vercelletto Asks and Answers the Question of &quot;Where is Informix?&quot;</title><description>You may have already read this article by my friend and &quot;Benchmark Guy&quot;, Eric Vercelletto, but it is so well done and contains so many great thoughts and observations that I think it needs to be posted here for you to read again (or for the first time).&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://en.vercelletto.com/2014/03/12/where-is-informix/&quot;&gt;Eric&#39;s Blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://en.vercelletto.com/?file_id=13&quot;&gt;Where is Informix?&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2014/03/eric-vercelletto-asks-where-is-informix.html</link><author>noreply@blogger.com (Andrew Ford)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-8954412987427654670</guid><pubDate>Tue, 17 Dec 2013 14:03:00 +0000</pubDate><atom:updated>2013-12-17T08:04:04.009-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">conference</category><category domain="http://www.blogger.com/atom/ns#">iiug2014</category><category domain="http://www.blogger.com/atom/ns#">miami</category><title>IIUG2014 Conference Update</title><description>&lt;div class=&quot;MsoPlainText&quot;&gt;I posted this on the IDS SIG yesterday. Here is it again in case you missed it and are interested.&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;The IIUG2014 CPC met at the JW Marriott in Miami, FL this weekend to prepare for the 2014 conference. I thought I would give an update on where we are at and pass along my experience with the city and hotel since this will be a new location for a lot of us in April. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;The hotel is beyond nice. The place is 98.34% Marble and Mahogany and smells terrific. Yes, it is weird to compliment a hotel on their smell, but I thought this to myself each time I entered the lobby. It is the nicest hotel I have ever stayed in and unless I hit the Florida Lotto, it will be the nicest hotel I ever stay in. The hotel is not undergoing a remodel nor are they planning on any major construction during the conference (for those that attended the Overland Park conferences, this is important). &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;In terms of number of rooms, the hotel is smaller than we are used to. It is very possible that we will have more conference attendees than we have rooms. If you know you will attend IIUG2014 you should register ASAP to guarantee a room in the hotel and take advantage of the Early Registration pricing. We do not have an overflow hotel and other hotels in the area are at least $50 more per night. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;In terms of conference space, the hotel is larger than we are used to. There are more session rooms and meeting space which will give us the ability to offer more sessions and tracks than we have in the past. Additionally, all of the conference space is contained on the 5th floor of the hotel and not spread out like it was in San Diego. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;The hotel has 3 restaurants and a bar. Isabela’s is open for breakfast only, La Terraza Café is open for lunch and dinner (very good, except for the chicken sandwich) and the Trapiche Room which is a super small 4 or 6 table intimate fine dining restaurant that is open for lunch and dinner. Perfect if you want to propose or you are spending your 20 year wedding anniversary at the IIUG conference. The bar is called Drake’s and is reminiscent of a classic British pub. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;The hotel is surrounded by non-conference activities if you want to get out at night or want to do something before or after the conference. Restaurants and shopping are within walking distance and there is a free trolley that runs every 15 minutes (approximately) that stops close to the hotel if you want to explore the city. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;The hotel has a Spa if you are in to that kind of thing. You can get a massage, a facial, mani/pedis and paraffin hand treatment among other things. There is also a fitness center complete with a sauna in the locker room. Fancy. The pool is heated and is stainless steel (you will just have to see for yourself) and there is a hot tub/whirlpool. All of this is on the 7th floor. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;The weather was beautiful and will be again in April with an average low of&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;70 F and average high of 85 F and very little chance of rain. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;I took a cab to/from the Miami International Airport. The cost was about $28 (not including tip) and took about 30 minutes with no traffic.&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;We met with the Head Chef to address some of the complaints we have had with our Vegetarian and Kosher food offerings and to ensure that our high standard for meals is met. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;That is about it for the hotel and city. We have a good idea of what sessions will be offered this year. If you submitted a proposal, you will be hearing from an IIUG2014 CPC member in the next week or so. As far as content goes, here is an idea of what you can expect:&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Troubleshooting and Performance Tuning&lt;/li&gt;&lt;li&gt;IWA&lt;/li&gt;&lt;li&gt;TimeSeries&lt;/li&gt;&lt;li&gt;NoSQL/JSON&lt;/li&gt;&lt;li&gt;Development&lt;/li&gt;&lt;li&gt;Cloud (ER, HDR/SDS/RSS)&lt;/li&gt;&lt;li&gt;Security&lt;/li&gt;&lt;li&gt;Hands on Labs&lt;/li&gt;&lt;li&gt;Thursday Tutorials (Full and Half Day)&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;We have also left a few session spots open and we want you to tell us what to put there. There will be an email blast from the IIUG soon asking you to submit any requests for sessions that you would like to see at IIUG2014 to &lt;a href=&quot;mailto:conference@iiug.org&quot;&gt;conference@iiug.org&lt;/a&gt;with a subject of SESSION REQUST and we will do what we can to find a willing presenter on the most requested topics that aren’t already covered. We can’t make any promises that your suggestion will be presented, but we will certainly try our best. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;Very tentative schedule, similar to last year:&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Sunday – Welcome Reception with food and open beer and wine bar&lt;/li&gt;&lt;li&gt;Monday – Breakfast and Lunch, AM Keynote, Conference Sessions, Hands on Labs, PM Event/Party with food and open beer and wine bar&lt;/li&gt;&lt;li&gt;Tuesday – Breakfast and Lunch, AM Keynote, Conference Sessions, Hands on Labs, PM Event/Party with food and open beer and wine bar&lt;/li&gt;&lt;li&gt;Wednesday – Breakfast and Lunch, Conference Sessions, Hands on Labs, No PM Event&lt;/li&gt;&lt;li&gt;Thursday – Breakfast and Lunch, Tutorials&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;MsoPlainText&quot;&gt;Registration is open now at &lt;a href=&quot;http://iiug2014.org/register.php&quot;&gt;iiug2014.org&lt;/a&gt;. Early registration at a discount of $225 over the Regular conference price is open through January 15, 2014. Don’t forget that all IIUG members can save an additional $100 on Early and Regular registration through April 7, 2014 and that IIUG membership is free at &lt;a href=&quot;http://www.iiug.org/&quot;&gt;www.iiug.org&lt;/a&gt;.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2013/12/iiug2014-conference-update.html</link><author>noreply@blogger.com (Andrew Ford)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-7646342135741721859</guid><pubDate>Fri, 03 May 2013 18:56:00 +0000</pubDate><atom:updated>2013-05-03T13:56:12.148-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">new features</category><category domain="http://www.blogger.com/atom/ns#">request for enhancement</category><category domain="http://www.blogger.com/atom/ns#">rfe</category><title>IBM Informix Request for Enhancement Tool</title><description>I have no idea how IBM decides what new features to add to Informix, but I do know that we can now be part of the discussion by using the new Request for Enhancement tool (RFE Tool).&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I took this for a spin today and I must admit this is a pretty interesting thing that you should check out. Not only can you submit your own requests for new features, you can view what everyone else has suggested and vote for what you want to have added.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are a lot of good ideas in there and I really hope to see some of these feature requests in later releases.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Take the&amp;nbsp;&lt;a href=&quot;https://www.ibm.com/developerworks/rfe/&quot; target=&quot;_blank&quot;&gt;RFE&lt;/a&gt;&amp;nbsp;for a spin today. Submit a request, it is fun.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To see the Informix specific RFEs,&amp;nbsp;&lt;a href=&quot;https://www.ibm.com/developerworks/rfe/execute?use_case=viewRFEs&quot; target=&quot;_blank&quot;&gt;search&lt;/a&gt;&amp;nbsp;under Brand: Information Management, Product Family: Informix.&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2013/05/ibm-informix-request-for-enhancement.html</link><author>noreply@blogger.com (Andrew Ford)</author><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-3180793337757452190</guid><pubDate>Mon, 08 Apr 2013 19:38:00 +0000</pubDate><atom:updated>2013-04-08T14:38:36.012-05:00</atom:updated><title>IBM Informix Marketing: You&#39;ve Come A Long Way, Baby</title><description>&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;2007&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&amp;nbsp;  &lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/SaYlmpIuE_o?rel=0&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;2013&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;http://www.youtube.com/embed/hP_0WR7B6Zk?rel=0&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://i0.kym-cdn.com/photos/images/original/000/328/813/8d6.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://i0.kym-cdn.com/photos/images/original/000/328/813/8d6.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2013/04/ibm-informix-marketing-youve-come-long.html</link><author>noreply@blogger.com (Andrew Ford)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/SaYlmpIuE_o/default.jpg" height="72" width="72"/><thr:total>6</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-3844589498904875844</guid><pubDate>Fri, 05 Apr 2013 20:44:00 +0000</pubDate><atom:updated>2013-04-05T15:44:33.437-05:00</atom:updated><title>When You Need to Store a String of Numbers in a CHAR Column</title><description>Sometimes you have to store a string of numbers in a CHAR column. Probably because the string of digits represents an account number or something similar and storing as an INTEGER or BIGINT doesn&#39;t really make sense. The account number could have leading zeros that would be lost if stored as an integer. Parts of the account number could store special information, like positions 2,3 and 4 identify what department an account belongs to and it might be useful to be able to select digit_string[2,4]. There are plenty of reasons to store numerical data in a string.&lt;br /&gt;&lt;br /&gt;What is the best way to ensure that all of the characters in the string are actually numbers?&lt;br /&gt;&lt;br /&gt;This is what I do, is there a better way to do it?&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;alter table my_table add constraint check (replace(rtrim(digit_string), &quot; &quot;, &quot;x&quot;)::bigint &amp;gt;= 0) constraint my_table_ck1;&lt;br /&gt;&lt;br /&gt;insert into my_table (digit_string) values (&quot;123456&quot;);&lt;br /&gt;&lt;br /&gt;1 row(s) inserted.&lt;br /&gt;&lt;br /&gt;insert into my_table (digit_string) values (&quot;abc123&quot;);&lt;br /&gt;&lt;br /&gt;1213: A character to numeric conversion process failed&lt;br /&gt;&lt;br /&gt;insert into my_table (digit_string) values (&quot;   123456&quot;);&lt;br /&gt;&lt;br /&gt;1213: A character to numeric conversion process failed&lt;br /&gt;&lt;br /&gt;update my_table set digit_string = &quot;xyzpdq&quot; where digit_string = &quot;123456&quot;;&lt;br /&gt;&lt;br /&gt;1213: A character to numeric conversion process failed&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The constraint will try to cast the digit string to a BIGINT, if this works then all of the characters in the string are numbers. If it doesn&#39;t work we get an SQL error and the bad data never makes it into our database.&lt;br /&gt;&lt;br /&gt;The replace(rtrim()) stuff attempts to capture leading white space in the digit string that would not cause the cast to a BIGINT to fail.&lt;br /&gt;&lt;br /&gt;There are plenty of other ways to accomplish the same thing, but I like this way.&lt;br /&gt;&lt;br /&gt;You could rely on the application to check the digit string before it inserts/updates the database, but I&#39;m pretty sure this isn&#39;t the best way.&lt;br /&gt;&lt;br /&gt;You could write a stored procedure that is run by insert/update triggers, but I don&#39;t think that is more efficient than the check constraint/cast to BIGINT method. This would have the benefit of being able to raise a user defined SQL error instead of the odd -1213 error, though.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2013/04/when-you-need-to-store-string-of.html</link><author>noreply@blogger.com (Andrew Ford)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-1108760495697660652</guid><pubDate>Tue, 26 Mar 2013 16:59:00 +0000</pubDate><atom:updated>2013-03-26T13:07:47.503-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">12.1</category><category domain="http://www.blogger.com/atom/ns#">new features</category><category domain="http://www.blogger.com/atom/ns#">vNext</category><category domain="http://www.blogger.com/atom/ns#">webcast</category><title>For My 100th Post: IBM Informix 12.1 - It&#39;s Simply Powerful</title><description>11:58 AM: Waiting for the IBM Informix It&#39;s Simply Powerful Webcast to start and on my screen I see IBM Informix 12.1, so I guess it is officially announced.&lt;br /&gt;&lt;br /&gt;12:00 PM: Moderator is giving the rules and regulations of the Webcast. Questions will be answered after the Webcast.&lt;br /&gt;&lt;br /&gt;12:01 PM: Chad Gates from Pronto Software, John Miller Informix Lead Architect and Sally Hartnell from IBM Marketing filling in for Jerry. Where&#39;s Jerry? He is unavoidably detained.&lt;br /&gt;&lt;br /&gt;12:03 PM: 12+ Years of Informix Innovation with IBM&lt;br /&gt;&lt;br /&gt;12:03 PM: Over 190 new partners in 2012&lt;br /&gt;&lt;br /&gt;12:04 PM: Overview of the new stuff in 12.1. Cloud, Easy of Use, Warehouse, Sensor Data Management and something else I missed&lt;br /&gt;&lt;br /&gt;12:05 PM: TimeSeries for Sensor Data. 5x Performance using 1/5 the resources as the competition&lt;br /&gt;&lt;br /&gt;12:07 PM: Compression: Reduces storage and improves performance.&lt;br /&gt;&lt;br /&gt;12:08 PM: JM3 talking about compression now. NEW! Index compression. NEW! Blob compression.&lt;br /&gt;&lt;br /&gt;12:10 PM: NEW! Automatic table compression&lt;br /&gt;&lt;br /&gt;12:11 PM: NEW! Primary Storage Manager replaces ISM for more backup solution options&lt;br /&gt;&lt;br /&gt;12:12 PM: Chad from Pronto Software now talking about their EVP experience.&lt;br /&gt;&lt;br /&gt;12:13 PM: Pronto has an ERP product that embeds Informix and Cognos. Informix initially picked for the OLTP capabilities. Informix 12.1 improves OLTP performance and OLAP performance benefiting from Informix Team working closely with the Cognos Team.&lt;br /&gt;&lt;br /&gt;12:26 PM: Pronto experiences massive performance gain when concurrently running OLTP and OLAP on 12.1 over 11.x&lt;br /&gt;&lt;br /&gt;12:28 PM: &quot;Informix Warehouse Accelerator gaining worldwide traction to accelerate warehouse queries up to 100+ times&quot;&lt;br /&gt;&lt;br /&gt;12:29 PM: Back to JM3 on IWA improvements. NEW! Trickle Feed (cool) can now have real time analytics vs. refreshing the entire warehouse. NEW! Automated Partition Refresh. NEW! IWA and OAT integration.&lt;br /&gt;&lt;br /&gt;12:31 PM: NEW! IWA and TimeSeries integration. IWA analytics over TimeSeries data.&lt;br /&gt;&lt;br /&gt;12:32 PM: Flexible Grid/ER - NEW! ER no longer requires a Primary Key.&lt;br /&gt;&lt;br /&gt;12:34 PM: Execute SQL over the grid - Query Sharding, that&#39;s sharding with a D.&lt;br /&gt;&lt;br /&gt;12:35 PM: Talking about Hypervisor edition for Virtual/Cloud based deployments.&lt;br /&gt;&lt;br /&gt;12:36 PM: Informix Genero accelerates new generation of mobile and cloud-based apps.&lt;br /&gt;&lt;br /&gt;12:36 PM: Sally: Informix integrated with the IBM Mobile Database. Sync mobile db data with Informix backend.&lt;br /&gt;&lt;br /&gt;12:37 PM: JM3: NEW! Mobile OAT for your phone or tablet&lt;br /&gt;&lt;br /&gt;12:38 PM: Improved OAT out of the box experience, OAT GUI deployed as part of Informix install&lt;br /&gt;&lt;br /&gt;12:39 PM: Sally: Smart Choice of ISVs and OEMs. Small footprint, silent install, up and running in minutes, 0 administration, autonomics. NEW! Dynamic ONCONFIG, Self Healing, Self Optimizing&lt;br /&gt;&lt;br /&gt;12:40 PM: About to wrap up? Already? Oh, right. Q/A at the end. I want MOAR new features :)&lt;br /&gt;&lt;br /&gt;12:41 PM: Bundling of Cognos licenses with new Advanced (Worgroup/Enterprise) Editions&lt;br /&gt;&lt;br /&gt;12:41 PM: IIUG 2013 April 21-25, 2013 San Diego, CA&lt;br /&gt;&lt;br /&gt;12:43 PM: Q/A starts.&lt;br /&gt;&lt;br /&gt;12:43 PM: &quot;Is compression available in Workgroup?&quot; Sally says Compression included in Advanced Enterprise, available for purchase in Enterprise.&lt;br /&gt;&lt;br /&gt;12:44 PM: &quot;64 bit OAT?&quot; JM3 says currently only 32 bit, but you can run 32 bit version on Windows 64 bit. Looking to have a 64 bit version for Windows in the future.&lt;br /&gt;&lt;br /&gt;12:45 PM: &quot;Is OAT faster in 12.1?&quot; JM3 says ability to run update stats on sysmaster will allow OAT to run faster&lt;br /&gt;&lt;br /&gt;12:46 PM: &quot;Is Pronto using compression?&quot; JM3 says no, perf gains are without compression&lt;br /&gt;&lt;br /&gt;12:47 PM: &quot;New tools to migration FROM Oracle?&quot; JM3 says yes, a lot of technology added to assist in migrations.&lt;br /&gt;&lt;br /&gt;12:48 PM: &quot;Will Mobile OAT work with my 11.x server?&quot; JM3 says yes&lt;br /&gt;&lt;br /&gt;12:48 PM: &quot;Where can I find more info about the new editions?&quot; Sally says go to ibm.com/informix and view the new brochure. More detail: google Carlton Doe Informix Editions or google ibm software announcement 213-156&lt;br /&gt;&lt;br /&gt;12:50 PM: &quot;Any plans to do a benchmark?&quot; Sally says the prefer industry specific real world benchmarks with their customers. Soon to publish a Meter Data Management benchmark.&lt;br /&gt;&lt;br /&gt;12:52 PM: &quot;Is ontape still supported?&quot; JM3 says ontape and onbar still supported in 12.1. onbar just improved with PSM.&lt;br /&gt;&lt;br /&gt;12:53 PM: &quot;Can I get Congnos express bundled instead of the full Cognos?&quot; Sally says no.&lt;br /&gt;&lt;br /&gt;12:54 PM: &quot;What do I need to do to use the compression features?&quot; Sally says compression included in Advanced Enterprise, add on for Enterprise.&lt;br /&gt;&lt;br /&gt;12:54 PM: &quot;What is the #1 thing to remember from this webcast?&quot; JM3 says the great improvements in OTLP/OLAP performance.&lt;br /&gt;&lt;br /&gt;12:55 PM: &quot;Is OAT built using a new version of PHP?&quot; JM3 says yes, OAT uses a later version of PHP.&lt;br /&gt;&lt;br /&gt;12:56 PM: &quot;Tell us more about IBM Mobile&quot; Sally says it is included with all for-pay versions of Informix and is a secure persistent storage for data on a device that allows backend syncronization to an Informix DB.&lt;br /&gt;&lt;br /&gt;12:57 PM: &quot;Can 12.1 replicate TimeSeries data?&quot; JM3 says, yes TimeSeries can now be replicated via HDR/SDS/RSS, etc.&lt;br /&gt;&lt;br /&gt;12:58 PM: Sally notes the great attendance to this Webcast and gives a shout out to IIUG 2013 (thanks Sally)&lt;br /&gt;&lt;br /&gt;12:59 PM: End of Webcast, perfectly timed. Replay of webcast will be made available online.&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2013/03/for-my-100th-post-ibm-informix-121-its.html</link><author>noreply@blogger.com (Andrew Ford)</author><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-7310588964949557304</guid><pubDate>Thu, 07 Mar 2013 22:36:00 +0000</pubDate><atom:updated>2013-03-07T16:36:32.221-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">spl</category><category domain="http://www.blogger.com/atom/ns#">string</category><title>Psuedo strtok in SPL</title><description>I needed a way to extract the individual words from a sentence stored in a single character field. After some failed google searches and no desire to install a Datablade or write a C UDR for something that doesn&#39;t need to have killer performance, I decided to write my own quick and dirty SPL function.&lt;br /&gt;&lt;br /&gt;my_strtok(str, delim, token_num) will take a string, break it into individual tokens based the delimiter and return the Nth token of the string.&lt;br /&gt;&lt;br /&gt;Running this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;execute function my_strtok(&quot;How now brown cow&quot;, &quot; &quot;, 3)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Would return the third token:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;brown&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Here is the code for my_strtok(), comments welcome on anything I might have missed in the logic. And when I say it is slow, I just mean it could be done in a different way and perform more efficiently, but for what I needed it works.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;create function my_strtok (str lvarchar(2048), delim char(1), token_num smallint)&lt;br /&gt;returning lvarchar(2048) as token;&lt;br /&gt;&lt;br /&gt;        define str_len integer;&lt;br /&gt;        define start_pos integer;&lt;br /&gt;        define stop_pos integer;&lt;br /&gt;        define cur_token_num integer;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        -- initialize start position and current token number to 1&lt;br /&gt;        let start_pos = 1;&lt;br /&gt;        let cur_token_num = 1;&lt;br /&gt;&lt;br /&gt;        -- remove any leading delimiters from the input string&lt;br /&gt;        let str = ltrim(str, delim);&lt;br /&gt;&lt;br /&gt;        -- save the input string length so we don&#39;t have to recalculate it later&lt;br /&gt;        let str_len = length(str);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        -- find the start of the token we want to return&lt;br /&gt;&lt;br /&gt;        -- while there is still more string available to process&lt;br /&gt;        while (start_pos &amp;lt;= str_len)&lt;br /&gt;                -- if the current token number is the token we want, stop looking&lt;br /&gt;                -- for a start position&lt;br /&gt;                if (cur_token_num = token_num) then&lt;br /&gt;                        exit;&lt;br /&gt;                end if;&lt;br /&gt;&lt;br /&gt;                -- increment the start position to the next character&lt;br /&gt;                let start_pos = start_pos + 1;&lt;br /&gt;&lt;br /&gt;                -- check to see if the current character in the string is a delimiter&lt;br /&gt;                if (substr(str, start_pos, 1) = delim) then&lt;br /&gt;                        -- we have found the next token&lt;br /&gt;                        let cur_token_num = cur_token_num + 1;&lt;br /&gt;&lt;br /&gt;                        -- advance the token start position past any repeating delimiters&lt;br /&gt;                        while (start_pos &amp;lt;= str_len)&lt;br /&gt;                                let start_pos = start_pos + 1;&lt;br /&gt;&lt;br /&gt;                                if (substr(str, start_pos, 1) != delim) then&lt;br /&gt;                                        -- there are no more repeating delimiters&lt;br /&gt;                                        -- stop looking for repeating delimiters&lt;br /&gt;                                        exit;&lt;br /&gt;                                end if;&lt;br /&gt;                        end while;&lt;br /&gt;                end if;&lt;br /&gt;        end while;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        -- we now either have the start position of the token we are looking for&lt;br /&gt;        -- or we did not find the token we were looking for&lt;br /&gt;        -- if we did not find the token, return NULL&lt;br /&gt;        -- if we did find the token we were looking for, find the end of the token&lt;br /&gt;&lt;br /&gt;        if (cur_token_num = token_num) then&lt;br /&gt;                -- we found the token&lt;br /&gt;                let stop_pos = start_pos;&lt;br /&gt;&lt;br /&gt;                -- while there is still string to process try to find the end of our token&lt;br /&gt;                -- if we run out of string before we find the next delimiter then&lt;br /&gt;                -- our token ends where the string ends&lt;br /&gt;                while (stop_pos &amp;lt;= str_len)&lt;br /&gt;                        let stop_pos = stop_pos + 1;&lt;br /&gt;&lt;br /&gt;                        if (substr(str, stop_pos, 1) = delim) then&lt;br /&gt;                                -- we found the end&lt;br /&gt;                                let stop_pos = stop_pos - 1;&lt;br /&gt;                                exit;&lt;br /&gt;                        end if;&lt;br /&gt;                end while;&lt;br /&gt;&lt;br /&gt;                -- return the found token&lt;br /&gt;                return substr(str, start_pos, stop_pos - start_pos + 1);&lt;br /&gt;        else&lt;br /&gt;                -- the token was not found&lt;br /&gt;                return NULL;&lt;br /&gt;        end if;&lt;br /&gt;end function;&lt;br /&gt;&lt;br /&gt;execute function my_strtok(&quot;Simple test&quot;, &quot; &quot;, 1);&lt;br /&gt;&lt;br /&gt;token  Simple&lt;br /&gt;&lt;br /&gt;1 row(s) retrieved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;execute function my_strtok(&quot;Simple test&quot;, &quot; &quot;, 2);&lt;br /&gt;&lt;br /&gt;token  test&lt;br /&gt;&lt;br /&gt;1 row(s) retrieved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;execute function my_strtok(&quot;    Leading delimiters&quot;, &quot; &quot;, 1);&lt;br /&gt;&lt;br /&gt;token  Leading&lt;br /&gt;&lt;br /&gt;1 row(s) retrieved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;execute function my_strtok(&quot;Repeating       delimiters&quot;, &quot; &quot;, 2);&lt;br /&gt;&lt;br /&gt;token  delimiters&lt;br /&gt;&lt;br /&gt;1 row(s) retrieved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;execute function my_strtok(&quot;Token not found&quot;, &quot; &quot;, 4);&lt;br /&gt;&lt;br /&gt;token&lt;br /&gt;&lt;br /&gt;1 row(s) retrieved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;execute function my_strtok(&quot;Should have checked for invalid input&quot;, &quot; &quot;, -1);&lt;br /&gt;&lt;br /&gt;token&lt;br /&gt;&lt;br /&gt;1 row(s) retrieved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;execute function my_strtok(&quot;Invalid input works, but is unecessarily slow&quot;, &quot; &quot;, -1000);&lt;br /&gt;&lt;br /&gt;token&lt;br /&gt;&lt;br /&gt;1 row(s) retrieved.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;execute function my_strtok(&quot;Empty delimiter defaults to space, convenient&quot;, &quot;&quot;, 6);&lt;br /&gt;&lt;br /&gt;token  convenient&lt;br /&gt;&lt;br /&gt;1 row(s) retrieved.&lt;br /&gt;&lt;/pre&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2013/03/psuedo-strtok-in-spl.html</link><author>noreply@blogger.com (Andrew Ford)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-7626476577088584355</guid><pubDate>Tue, 05 Mar 2013 18:11:00 +0000</pubDate><atom:updated>2013-03-05T14:23:00.433-06:00</atom:updated><title>Where Are They Now?</title><description>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;Where did I find this picture, can you identify anyone in this picture and what is the guy on the left looking at on the ground?&lt;div&gt;&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-NrA7_J0qUTc/UTZTx9DvbXI/AAAAAAAAAJA/hkaLe3F6vQ8/s1600/cheese.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-NrA7_J0qUTc/UTZTx9DvbXI/AAAAAAAAAJA/hkaLe3F6vQ8/s1600/cheese.jpg&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Say &quot;CHEESE&quot;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2013/03/a-fun-picture.html</link><author>noreply@blogger.com (Andrew Ford)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-NrA7_J0qUTc/UTZTx9DvbXI/AAAAAAAAAJA/hkaLe3F6vQ8/s72-c/cheese.jpg" height="72" width="72"/><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-7851788367077387754</guid><pubDate>Mon, 04 Mar 2013 22:17:00 +0000</pubDate><atom:updated>2013-03-04T16:17:05.897-06:00</atom:updated><title>From the SIGs - LTXHWM and LTXEHWM</title><description>John Adamski posted a question to the&amp;nbsp;&lt;a href=&quot;http://www.iiug.org/forums/technical.php&quot; target=&quot;_blank&quot;&gt;IIUG SIGs&lt;/a&gt;&amp;nbsp;about how to identify a session that caused the long transaction that eventually put his system in a Blocked:LONGTX state. A few of us came back with some responses, but it wasn&#39;t until John Miller III from IBM and&amp;nbsp;&lt;a href=&quot;http://informix.jfmiii.com/&quot; target=&quot;_blank&quot;&gt;Informix Fun Facts&lt;/a&gt;&amp;nbsp;replied with &quot;finding the session that caused your long transaction isn&#39;t very useful, you need to prevent this situation from happening with the LTXHWM and LTXEHWM ONCONFIG parameters&quot; that I realized these config parameters are typically underutilized.&lt;br /&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;b&gt;LTXHWM and LTXEHWM&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;LTXHWM is the percentage of logical log space a transaction can span before it is declared to be a long transaction and is rolled back by the engine.&lt;br /&gt;&lt;br /&gt;John points out that this rollback only affects the session being rolled back (well, excluding any extra strain on the system rolling back a long transaction creates), nothing else is blocked.&lt;br /&gt;&lt;br /&gt;LTXEHWM is the percentage of logical log space a transaction can span before the engine decides we are in a bad enough situation that we need to block all other modifications to try and ensure we have enough logical log space to complete the roll back. This does affect other sessions and if your system is in a Blocked:LONGTX your users will be very unhappy and you are likely going to have a very bad day.&lt;br /&gt;&lt;br /&gt;Your day will get infinitely worse if even after blocking other sessions you do not have enough logical log space to complete the rollback of the long transaction. You can read about recovering from a long transaction hang in the manuals if you want. I warn you, it involves a point in time restore or a call to IBM Informix support.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Default Values&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;Out of the box LTXHWM is 70 and LTXEHWM is 80. Are these too high? They probably are if you have significant logical log space.&lt;br /&gt;&lt;br /&gt;On one of my instances I have 16 GB of logical log space. This means that one of my users can start a transaction that spans 11.2 GB of logical log space before he gets the boot and the engine starts rolling back his long transaction. That is going to be a lot of rolling back and if it took this long transaction 3 hours to get to the point it needed to roll back I can expect the rollback to last at least 3 hours.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Avoid the One Size Fits All LTXHWM/LTXEHWM Recommendations&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;I had always believed that the 70/80 defaults were too high,and I&#39;ve always heard that a better alternative is 50/60 and admittedly that is what I have always set my values to.&lt;br /&gt;&lt;br /&gt;I&#39;m rethinking that now. I don&#39;t know why it took me this long to rethink this, probably because I haven&#39;t had any problems with long transactions lately so I&#39;ve been thinking about other things. One thing is for sure, a LTXHWM of 50 is still way too high for my system.&lt;br /&gt;&lt;br /&gt;This is an OLTP system with no long running transactions and a lot of logical log space configured so we can run for at least 48 hours without needing to back up a logical log in case we have a TSM outage.&lt;br /&gt;&lt;br /&gt;My LTXHWM should be a lot lower, probably something as ridiculous sounding as 5. I know the kind of transactions that run on my system and no single transaction should span more than 1 GB of logical log space and if it does, something is wrong. I want to kill that transaction ASAP so I only have a performance hit while rolling back 1 GB of logical logs instead of 11 GB.&lt;br /&gt;&lt;br /&gt;I think my LTXEHWM setting of 60 is OK, maybe it could even go a little bit higher. The only reason I would want to block my engine to allow a transaction to rollback is if I thought I was in danger of not being able to complete the rollback because of limited logical log space. Setting this ONCONFIG lower doesn&#39;t make any sense.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2013/03/from-sigs-ltxhwm-and-ltxehwm.html</link><author>noreply@blogger.com (Andrew Ford)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-1307255234637185101</guid><pubDate>Fri, 01 Mar 2013 21:02:00 +0000</pubDate><atom:updated>2013-03-01T15:30:25.900-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">application development</category><category domain="http://www.blogger.com/atom/ns#">performance tuning</category><category domain="http://www.blogger.com/atom/ns#">select for update</category><category domain="http://www.blogger.com/atom/ns#">where current of</category><title>Hot Topic - SELECT FOR UPDATE/WHERE CURRENT OF</title><description>&quot;Holy Cow, two blog posts in one day!&quot; - Harry Caray &lt;br /&gt;&lt;br /&gt;Ben Thompson over at&amp;nbsp;&lt;a href=&quot;http://informixdba.wordpress.com/2013/02/25/select-for-update/&quot; target=&quot;_blank&quot;&gt;Informed Mix&lt;/a&gt;&amp;nbsp;currently wrote about using &quot;select for update/where current of&quot; syntax and in the mother of all coincidences one of the developers that writes code that hits my Informix engines came over to tell me about the evolution of performance improvements he went through to speed up a bulk data delete application. Here is his story, from static SQL all the way to prepared statements using the &quot;select for update/where current of&quot; syntax.&lt;br /&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;First, the formalities. This particular developer is writing an application that will delete a bunch &#39;o data from a table. Since he is a nice guy he is writing the application in a way that will avoid long transactions and not hold too many locks at once.&lt;br /&gt;&lt;br /&gt;Basically he is doing one of these:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;select primary key fields of rows to delete&lt;br /&gt;&lt;br /&gt;begin work&lt;br /&gt;&lt;br /&gt;for each row:&lt;br /&gt;   delete by primary key&lt;br /&gt;&lt;br /&gt;   if time to commit:&lt;br /&gt;      commit work&lt;br /&gt;      begin work&lt;br /&gt;&lt;br /&gt;commit work&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In his first attempt, he built and executed a static delete sql string for each row to delete.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;delete from table where field1 = &quot;ABC&quot; and field2 = &quot;123&quot;;&lt;br /&gt;delete from table where field1 = &quot;DEF&quot; and field2 = &quot;456&quot;;&lt;br /&gt;delete from table where field1 = &quot;GHI&quot; and field2 = &quot;789&quot;;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Of course this works, but has the unpleasant side effect of being the worst way possible to do this since the engine has to parse, optimize and execute each statement every time.&lt;br /&gt;&lt;br /&gt;This yielded a result of 463.18 deletes per second.&lt;br /&gt;&lt;br /&gt;In his second attempt, he used a prepared statement for the delete which is better because the engine only has to parse and optimize the statement once.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;delete from table where field1 = ? and field2 = ?;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This gave a result of 1016.50 deletes per second.&lt;br /&gt;&lt;br /&gt;In his third (and currently, final) attempt he took advantage of the &quot;select for update/update where current of&quot; functionality.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;declare cursor cur for select 1 from the_table where date_field &amp;lt; today - 180 for update&lt;br /&gt;&lt;br /&gt;open cur&lt;br /&gt;&lt;br /&gt;begin work&lt;br /&gt;&lt;br /&gt;for each row in cur:&lt;br /&gt;   delete from the_table where current of cur&lt;br /&gt;&lt;br /&gt;   if time to commit:&lt;br /&gt;      commit work&lt;br /&gt;      begin work&lt;br /&gt;&lt;br /&gt;commit work&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This was a huge boost to performance since the engine already knows where the row we want to delete lives and we don&#39;t have to go through indexes and data pages to find it again.&lt;br /&gt;&lt;br /&gt;Final results were 1923.00 deletes per second.&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2013/03/hot-topic-select-for-updatewhere.html</link><author>noreply@blogger.com (Andrew Ford)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-7919809224992274208</guid><pubDate>Fri, 01 Mar 2013 16:21:00 +0000</pubDate><atom:updated>2013-03-01T15:30:09.389-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">conference</category><category domain="http://www.blogger.com/atom/ns#">iiug 2013</category><category domain="http://www.blogger.com/atom/ns#">marketing</category><category domain="http://www.blogger.com/atom/ns#">uptime</category><category domain="http://www.blogger.com/atom/ns#">weird</category><title>Informix News of the Weird</title><description>&lt;b&gt;Informix Engine Defies Laws of the Universe&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;I recently inherited an Informix engine from another department as part of a server migration and upgrade to Innovator-C. In my life long pursuit of finding unattended Informix engines with ridiculously long up times I did an &#39;onstat -&#39; to see how many days this engine had been running.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;[informix]$ onstat -&lt;br /&gt;&lt;br /&gt;IBM Informix Dynamic Server Version 10.00.UC3R1   -- On-Line (Prim) -- Up 869 days 12:02:13 -- 2423888 Kbytes&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Hey, 2.38 years without an engine bounce, not too shabby! When I started to brag about the resiliency of Informix to the previous owner of this engine who deals mostly with other database engines he came back with, &quot;Well, that IS pretty amazing considering the server was rebooted a year ago&quot;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;[informix]$ uptime&lt;br /&gt; 09:16:11  up 372 days,  9:01,  2 users,  load average: 0.30, 0.41, 0.43&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Informix really is amazing. Show me any other engine that can continue to run when the server is offline. What is more impressive is this was version 10, I can only imagine what the Informix Developers have in store for us in Centaurus.&lt;br /&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;As Seen on TV&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;The marketing team is at it again securing some SWEET product placement on UK Television. Thanks to Mike Aubury for catching the Informix Umbrella Lady on last night&#39;s showing of &quot;Hugh&#39;s Fist Fight&quot; on Channel 4. Take that Iron Man 2.&lt;br /&gt;&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-DfSxLNtzT3E/UTDRaW5pnMI/AAAAAAAAAIg/0OGbd8Vnn_Q/s1600/informix_on_tv.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-DfSxLNtzT3E/UTDRaW5pnMI/AAAAAAAAAIg/0OGbd8Vnn_Q/s1600/informix_on_tv.png&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Oh, Informix Umbrella Lady on Channel 4, what is thy name?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;Database Administrators Gettin&#39; Freaky&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;According to The Huffington Post, Database Administrators are the 9th most likeliest people to hook up (in the biblical sense) with co-workers.&lt;br /&gt;&lt;br /&gt;I didn&#39;t believe it either, but it is on the internet so it must be true because&amp;nbsp;&lt;a href=&quot;http://www.huffingtonpost.com/2013/02/07/hook-up-jobs-workers-office-fling_n_2632410.html?utm_hp_ref=tw#slide=2070850&quot; target=&quot;_blank&quot;&gt;the internet doesn&#39;t lie&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Record Number of People Hate Money&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;Quite possibly the weirdest thing of all, people not signing up for a FREE IIUG membership to save $100 USD on conference registration. I mean, hey, as a IIUG 2013 CPC member thanks for the $100 to help fund IIUG 2014, but c&#39;mon. You should really take advantage of that discount. Unless of course you are not taking it on purpose so you can cleverly get your company to fund the IIUG for an extra $100.&lt;br /&gt;&lt;br /&gt;Register for IIUG 2013 at&amp;nbsp;&lt;a href=&quot;https://www.iiug.org/conf/2013/iiug/register.php&quot; target=&quot;_blank&quot;&gt;iiug2013.org&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2013/03/informix-news-of-weird.html</link><author>noreply@blogger.com (Andrew Ford)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-DfSxLNtzT3E/UTDRaW5pnMI/AAAAAAAAAIg/0OGbd8Vnn_Q/s72-c/informix_on_tv.png" height="72" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5559317973653027936.post-7605981671022441198</guid><pubDate>Tue, 05 Feb 2013 21:52:00 +0000</pubDate><atom:updated>2013-02-05T15:52:45.451-06:00</atom:updated><title>Have You Heard? It&#39;s Simply Powerful.</title><description>Of course I&#39;m talking about the March 5th, 2013 IBM Informix Webcast that will talk about the latest release, but if you&#39;re reading this on&amp;nbsp;&lt;a href=&quot;http://planetids.com/&quot; target=&quot;_blank&quot;&gt;Planet IDS&lt;/a&gt;&amp;nbsp;you&#39;ve already heard about it from Fernando, Eric and Gary and you can stop reading right now.&lt;br /&gt;&lt;br /&gt;If this is the first you&#39;ve heard of this event, then read on...&lt;br /&gt;&lt;br /&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;If you are not part of the EVP then you are likely wondering what will be included in the 12.10 release (I think that is what they&#39;re going to number it) that is code named Centaurus. If this describes you, then you will want to attend.&lt;br /&gt;&lt;br /&gt;Here are the details:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The New IBM Informix: It&#39;s Simply Powerful &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;Date: Tuesday, March 5, 2013 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;Time: 10:00 AM PST &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;IBM Informix is exceptional database software that is well known for its superior &amp;nbsp; &amp;nbsp; &lt;br /&gt;performance, high availability and efficiency, minimal complexity and lower computing &lt;br /&gt;costs to power online transaction processing (OLTP) and decision support applications &lt;br /&gt;for businesses of all sizes. Informix incorporates design concepts that are &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;significantly different from traditional relational platforms, resulting in extremely &lt;br /&gt;high levels of performance and availability, distinctive capabilities in data &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;replication and scalability, and minimal administrative overhead. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;The newest release offers clients and partners the ability to take their business into&lt;br /&gt;the future, right now! Whether you are looking for help maximizing your daily business&lt;br /&gt;activities through more efficient operational analytics; deploying applications to the&lt;br /&gt;private cloud; working with sensor or meter data; or just looking to increase your &amp;nbsp; &amp;nbsp;&lt;br /&gt;productivity and usability, the new release brings you a cost-effective, simply &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;powerful solution that addresses all your data management requirements. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;&lt;a href=&quot;http://event.on24.com/r.htm?e=571631&amp;amp;s=1&amp;amp;k=6740A7076E0FE9C59EBFDC80C8487D34&amp;amp;partnerref=IBM01&quot; target=&quot;_blank&quot;&gt;Register Today&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Comment on this post and read more about Informix at &lt;a href=&quot;http://www.informix-dba.com&quot; target=&quot;_blank&quot;&gt;informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Contact the author at &lt;a href=&quot;mailto:andrew@informix-dba.com&quot;&gt;andrew@informix-dba.com&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><link>http://www.informix-dba.com/2013/02/have-you-heard-its-simply-powerful.html</link><author>noreply@blogger.com (Andrew Ford)</author><thr:total>0</thr:total></item></channel></rss>