Skip to content

Commit

Permalink
Merge pull request #67 from Indicia-Team/hotfix-report_performance
Browse files Browse the repository at this point in the history
Hotfix report performance
  • Loading branch information
johnvanbreda committed Dec 9, 2015
2 parents 6330df2 + 43e9af5 commit 78a5207
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions application/libraries/ReportEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -986,14 +986,14 @@ private function getSysFuncFieldName($entity, $sysfunc, $dataType, $forceVarchar
$suffix = $forceVarchar ? '::varchar' : '';
switch ($dataType) {
case 'F':
return "{$entity}_$sysfunc.float_value$forceVarchar\n";
return "{$entity}_$sysfunc.float_value$suffix\n";
break;
case 'T':
return "{$entity}_$sysfunc.text_value\n";
break;
case 'D':
case 'V':
return "{$entity}_$sysfunc.date_start_value$forceVarchar\n";
return "{$entity}_$sysfunc.date_start_value$suffix\n";
break;
case 'L':
return "t{$entity}_$sysfunc.term\n";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ function spatial_index_builder_populate($db) {
$filter=spatial_index_builder_get_type_filter();
list($join, $where, $surveyRestriction)=$filter;
// Now the actual population
$query = "insert into index_locations_samples (location_id, sample_id, contains)
select l.id, s.id, st_contains(l.boundary_geom, s.geom)
$query = "insert into index_locations_samples (location_id, sample_id, contains, location_type_id)
select l.id, s.id, st_contains(l.boundary_geom, s.geom), l.location_type_id
from locations l
$join
join samples s on s.deleted=false
Expand Down

0 comments on commit 78a5207

Please sign in to comment.