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 2016/12/21 18:12:58 UTC
[jira] [Updated] (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 updated TC-79:
------------------------------
Description:
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)
was:
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.
> 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
> 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.3.4#6332)