<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: History Data in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/history-data/m-p/3071715#M904947</link>
    <description>hi,&lt;BR /&gt;&lt;BR /&gt;to add to the above replies, Partitioning wil be the way to go.&lt;BR /&gt;&lt;BR /&gt;In general, range partitioning should come to your rescue, especially that it is useful when you have data that is logically segregated by some value(s). Time-based data immediately comes to the forefront as a classif example. Partition by "Sales Quarter". Partition by "Fiscal year". Partition by "Month". Range partitioning is able to take advantage of partition elimination in many cases, including use of exact equality and ranges - less than, greater than, between, and so on.&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;CREATE TABLE partitioned (&lt;BR /&gt;       timestamp   date,&lt;BR /&gt;       id int)&lt;BR /&gt;     PARTITION BY RANGE(timestamp)&lt;BR /&gt;     (&lt;BR /&gt;      PARTITION jan_2003 VALUES LESS THAN (to_date('01/02/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION feb_2003 VALUES LESS THAN (to_date('01/03/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION mar_2003 VALUES LESS THAN (to_date('01/04/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION apr_2003 VALUES LESS THAN (to_date('01/05/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION may_2003 VALUES LESS THAN (to_date('01/06/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION jun_2003 VALUES LESS THAN (to_date('01/07/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION jul_2003 VALUES LESS THAN (to_date('01/08/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION aug_2003 VALUES LESS THAN (to_date('01/09/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION sep_2003 VALUES LESS THAN (to_date('01/10/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION oct_2003 VALUES LESS THAN (to_date('01/11/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION nov_2003 VALUES LESS THAN (to_date('01/12/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION dec_2003 VALUES LESS THAN (to_date('01/01/2004','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION jan_2004 VALUES LESS THAN (to_date('01/02/2004','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION feb_2004 VALUES LESS THAN (to_date('01/03/2004','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION the_rest VALUES LESS THAN (maxvalue));&lt;BR /&gt;&lt;BR /&gt;You may also wish to keep HISTORY tables and age the data out and archive it.&lt;BR /&gt;If you need any further assistance, please let us know.&lt;BR /&gt;&lt;BR /&gt;hope this helps!&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Yogeeraj&lt;BR /&gt;</description>
    <pubDate>Tue, 16 Sep 2003 08:34:22 GMT</pubDate>
    <dc:creator>Yogeeraj_1</dc:creator>
    <dc:date>2003-09-16T08:34:22Z</dc:date>
    <item>
      <title>History Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-data/m-p/3071712#M904944</link>
      <description>I have a history table which has data for 25 months. Each month no of customers will&lt;BR /&gt;keep on increasing, like , &lt;BR /&gt;&lt;BR /&gt;1st month  - 1000&lt;BR /&gt;2nd month - 1250 &lt;BR /&gt;3rd month - 1550 ..so on..&lt;BR /&gt;..&lt;BR /&gt;..&lt;BR /&gt;24th month(Jul) - 15300&lt;BR /&gt;25th month(Aug) - 15500 &lt;BR /&gt;&lt;BR /&gt;Note : Above Numbers are for example and in actual data I have millions of records.&lt;BR /&gt;&lt;BR /&gt;Say,  2 most recent month's data are of July and August.&lt;BR /&gt;I'm interested only in new customers in august, which i can get by &lt;BR /&gt;&lt;BR /&gt;Aug customers &lt;BR /&gt;MINUS&lt;BR /&gt;Jul customers&lt;BR /&gt;&lt;BR /&gt;When i say aug minus july , due to huge volume of data it takes long to return.&lt;BR /&gt;I'm planning to create a view which will have only one month (July) data. Will this&lt;BR /&gt;improve performance ? I have a doubt, since its going to access same huge &lt;BR /&gt;data when i query the view also.&lt;BR /&gt;&lt;BR /&gt;We cant delete the historical data, as we use them for other processes.&lt;BR /&gt;Please advise , how this situation can be handled.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Mon, 15 Sep 2003 20:31:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-data/m-p/3071712#M904944</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-09-15T20:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: History Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-data/m-p/3071713#M904945</link>
      <description>A view may or may not improve your retrieval times; it all depends upon the efficiency of your query/indexing scheme. Ideally, you would like the same index which selects your rows to also be the index that orders the output --- in those cases the first chunk of rows which satify the where clause are returned almost immediately.&lt;BR /&gt;&lt;BR /&gt;Plan B - a kludge: If this is a very common query the pre-select the monthly queries into tables and then do your monthly queries against these tables.&lt;BR /&gt;&lt;BR /&gt;Plan C - Consider the use of partitioned tables.&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Sep 2003 20:42:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-data/m-p/3071713#M904945</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-09-15T20:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: History Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-data/m-p/3071714#M904946</link>
      <description>Thanks. Let me look into Partition.&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Sep 2003 21:03:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-data/m-p/3071714#M904946</guid>
      <dc:creator>Prabhu_7</dc:creator>
      <dc:date>2003-09-15T21:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: History Data</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/history-data/m-p/3071715#M904947</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;to add to the above replies, Partitioning wil be the way to go.&lt;BR /&gt;&lt;BR /&gt;In general, range partitioning should come to your rescue, especially that it is useful when you have data that is logically segregated by some value(s). Time-based data immediately comes to the forefront as a classif example. Partition by "Sales Quarter". Partition by "Fiscal year". Partition by "Month". Range partitioning is able to take advantage of partition elimination in many cases, including use of exact equality and ranges - less than, greater than, between, and so on.&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;CREATE TABLE partitioned (&lt;BR /&gt;       timestamp   date,&lt;BR /&gt;       id int)&lt;BR /&gt;     PARTITION BY RANGE(timestamp)&lt;BR /&gt;     (&lt;BR /&gt;      PARTITION jan_2003 VALUES LESS THAN (to_date('01/02/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION feb_2003 VALUES LESS THAN (to_date('01/03/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION mar_2003 VALUES LESS THAN (to_date('01/04/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION apr_2003 VALUES LESS THAN (to_date('01/05/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION may_2003 VALUES LESS THAN (to_date('01/06/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION jun_2003 VALUES LESS THAN (to_date('01/07/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION jul_2003 VALUES LESS THAN (to_date('01/08/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION aug_2003 VALUES LESS THAN (to_date('01/09/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION sep_2003 VALUES LESS THAN (to_date('01/10/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION oct_2003 VALUES LESS THAN (to_date('01/11/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION nov_2003 VALUES LESS THAN (to_date('01/12/2003','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION dec_2003 VALUES LESS THAN (to_date('01/01/2004','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION jan_2004 VALUES LESS THAN (to_date('01/02/2004','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION feb_2004 VALUES LESS THAN (to_date('01/03/2004','dd/mm/yyyy')),&lt;BR /&gt;      PARTITION the_rest VALUES LESS THAN (maxvalue));&lt;BR /&gt;&lt;BR /&gt;You may also wish to keep HISTORY tables and age the data out and archive it.&lt;BR /&gt;If you need any further assistance, please let us know.&lt;BR /&gt;&lt;BR /&gt;hope this helps!&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Yogeeraj&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Sep 2003 08:34:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/history-data/m-p/3071715#M904947</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2003-09-16T08:34:22Z</dc:date>
    </item>
  </channel>
</rss>

