updated docs - reportable - Fork of reportable required by WarVox, from hdm/reportable.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit b3b59ff8b4f366dac401283d3f80631b8d71d4bf
(DIR) parent 1553007ee04f6544b5a9771bcb687630666474af
(HTM) Author: Marco Otte-Witte <marco.otte-witte@simplabs.com>
Date: Thu, 15 Jan 2009 12:00:20 +0100
updated docs
Diffstat:
M README.rdoc | 14 ++++++++++++++
M rdoc/classes/Kvlr/ReportsAsSparkli… | 3 ++-
M rdoc/created.rid | 2 +-
M rdoc/files/README_rdoc.html | 20 +++++++++++++++++++-
M rdoc/files/lib/kvlr/reports_as_spa… | 2 +-
5 files changed, 37 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/README.rdoc b/README.rdoc
@@ -68,6 +68,20 @@ If you are on Rails < 2.1, do this from your RAILS_ROOT
rake db:migrate
+== Performance
+
+To achieve best performance, you should add indices to your tables on the date columns that are
+used for grouping the records (see Kvlr::ReportsAsSparkline::ClassMethods.reports_as_sparkline):
+
+ add_index :[table], :[date_column]
+
+If you are on PostgreSQL, you should add functional indices:
+
+ add_index :[table], :[date_column], :functional => "date_trunc('hour', [date_column])"
+ add_index :[table], :[date_column], :functional => "date_trunc('day', [date_column])"
+ add_index :[table], :[date_column], :functional => "date_trunc('week', [date_column])"
+ add_index :[table], :[date_column], :functional => "date_trunc('year', [date_column])"
+
== TODOs/ future plans
* support for Oracle and DB2 (and others?) missing
(DIR) diff --git a/rdoc/classes/Kvlr/ReportsAsSparkline/ReportingPeriod.html b/rdoc/classes/Kvlr/ReportsAsSparkline/ReportingPeriod.html
@@ -82,7 +82,8 @@
<p>
A <a href="ReportingPeriod.html">ReportingPeriod</a> is - depending on the
<a href="Grouping.html">Grouping</a> - either a specific hour, a day, a
-month or a year. All records falling into this period will be grouped.
+month or a year. All records falling into this period will be grouped
+together.
</p>
</div>
(DIR) diff --git a/rdoc/created.rid b/rdoc/created.rid
@@ -1 +1 @@
-Thu, 15 Jan 2009 11:34:04 +0100
+Thu, 15 Jan 2009 12:00:12 +0100
(DIR) diff --git a/rdoc/files/README_rdoc.html b/rdoc/files/README_rdoc.html
@@ -56,7 +56,7 @@
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
- <td>Thu Jan 15 11:33:40 +0100 2009</td>
+ <td>Thu Jan 15 11:59:48 +0100 2009</td>
</tr>
</table>
</div>
@@ -191,6 +191,24 @@ If you are on Rails &lt; 2.1, do this from your RAILS_ROOT
<pre>
rake db:migrate
</pre>
+<h2>Performance</h2>
+<p>
+To achieve best performance, you should add indices to your tables on the
+date columns that are used for grouping the records (see
+Kvlr::ReportsAsSparkline::ClassMethods.reports_as_sparkline):
+</p>
+<pre>
+ add_index :[table], :[date_column]
+</pre>
+<p>
+If you are on PostgreSQL, you should add functional indices:
+</p>
+<pre>
+ add_index :[table], :[date_column], :functional => "date_trunc('hour', [date_column])"
+ add_index :[table], :[date_column], :functional => "date_trunc('day', [date_column])"
+ add_index :[table], :[date_column], :functional => "date_trunc('week', [date_column])"
+ add_index :[table], :[date_column], :functional => "date_trunc('year', [date_column])"
+</pre>
<h2>TODOs/ future plans</h2>
<ul>
<li>support for Oracle and DB2 (and others?) missing
(DIR) diff --git a/rdoc/files/lib/kvlr/reports_as_sparkline/reporting_period_rb.html b/rdoc/files/lib/kvlr/reports_as_sparkline/reporting_period_rb.html
@@ -56,7 +56,7 @@
</tr>
<tr class="top-aligned-row">
<td><strong>Last Update:</strong></td>
- <td>Thu Jan 15 11:13:51 +0100 2009</td>
+ <td>Thu Jan 15 11:36:51 +0100 2009</td>
</tr>
</table>
</div>