<div dir="ltr"><div dir="ltr"><p style="box-sizing:border-box;margin:0px 0px 10px;color:rgb(51,51,51);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;background-color:rgb(247,246,244)">Hi, All</p><p style="box-sizing:border-box;margin:0px 0px 10px;color:rgb(51,51,51);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;background-color:rgb(247,246,244)">As octavia resources increase, I found that running the "openstack loadbalancer list" command takes longer and longer. Sometimes a 504 error is reported.</p><p style="box-sizing:border-box;margin:0px 0px 10px;color:rgb(51,51,51);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;background-color:rgb(247,246,244)">By reading the code, I found that octavia will performs complex left outer join queries when acquiring resources such as loadbalancer, listener, pool, etc. in order to only make one trip to the database.<br style="box-sizing:border-box">Reference code: <a href="http://paste.openstack.org/show/730022" style="box-sizing:border-box;background-color:transparent;color:rgb(196,52,34);text-decoration-line:none">http://paste.openstack.org/show/730022</a> Line 133<br style="box-sizing:border-box">Generated SQL statements: <a href="http://paste.openstack.org/show/730021" style="box-sizing:border-box;background-color:transparent;color:rgb(196,52,34);text-decoration-line:none">http://paste.openstack.org/show/730021</a></p><p style="box-sizing:border-box;margin:0px 0px 10px;color:rgb(51,51,51);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;background-color:rgb(247,246,244)">So, I suggest that adjust the query strategy to provide different join queries for different resources.</p><p style="box-sizing:border-box;margin:0px 0px 10px;background-color:rgb(247,246,244)"><font color="#333333" face="Helvetica Neue, Helvetica, Arial, sans-serif"><span style="font-size:14px"><a href="https://storyboard.openstack.org/#!/story/2003751">https://storyboard.openstack.org/#!/story/2003751</a></span></font><br></p></div></div>