You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "Jeremy Mitchell (JIRA)" <ji...@apache.org> on 2017/06/30 15:14:00 UTC

[jira] [Closed] (TC-79) TO: Fix Postgres non-performant queries

     [ https://issues.apache.org/jira/browse/TC-79?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeremy Mitchell closed TC-79.
-----------------------------

> TO: Fix Postgres non-performant queries
> ---------------------------------------
>
>                 Key: TC-79
>                 URL: https://issues.apache.org/jira/browse/TC-79
>             Project: Traffic Control
>          Issue Type: Improvement
>          Components: Traffic Ops
>    Affects Versions: 2.0.0
>            Reporter: Jeremy Mitchell
>            Assignee: Jeremy Mitchell
>             Fix For: 2.0.0
>
>
> The following query takes ~20ms in mysql but ~700+ms in postgres:
> https://github.com/apache/incubator-trafficcontrol/blob/master/traffic_ops/app/lib/Schema/Result/DeliveryServiceInfoForDomainList.pm#L41
> Also, the following query is not performant when multiple items are passed into the "IN" clause:
> https://github.com/apache/incubator-trafficcontrol/blob/master/traffic_ops/app/lib/Schema/Result/DeliveryServiceInfoForServerList.pm#L41
> these queries affect routes that traffic ops ORT uses and they need to be performant. 
> Here is an example route that uses query #1 - /genfiles/view/:host_name/hosting.config <-- where host is a "mid"
> Here is an example route that uses query #2 - /genfiles/view:host_name/hosting.config <-- where host is not a "mid" (i.e. an edge)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)