Opened 11 years ago

Closed 11 years ago

#1092 closed defect (fixed)

web_descriptor_detail_method dataview timeout

Reported by: Kurt Endress Owned by: dbmulg
Priority: minor Milestone: Post-NPGS Prod'n
Component: Public Website App. Version: 1.9.4 Server
Severity: Keywords:
Cc: Database Engine: N/A
Operating System: N/A

Description

The PW dataview web_descriptor_detail_method often times out.
for example descriptorid=245002 or 90047

​https://npgsweb.ars-grin.gov/gringlobal/descriptordetail.aspx?id=90047

The SQL may need optimization.

Change History (3)

comment:1 by Kurt Endress, 11 years ago

I've optimized this dataview on npgsdev. It seems to work better for large crops ​https://npgsdev.ars-grin.gov/gringlobal/descriptordetail.aspx?id=65111

SELECT

m.method_id,
m.name,
cto.crop_trait_id,
count(distinct i.accession_id) as cnt

from method m

join crop_trait_observation cto

on m.method_id = cto.method_id

INNER JOIN inventory i ON cto.inventory_id = i.inventory_id

where

cto.crop_trait_id = :descriptorid

group by

m.method_id, m.name, cto.crop_trait_id

order by m.name

comment:2 by Martin Reisinger, 11 years ago

Milestone: Post 1.0 → Post-NPGS Prod'n

comment:3 by dbmulg, 11 years ago

Resolution: → fixed
Status: new → closed

fixed 1.9.6.2

Note: See TracTickets for help on using tickets.