<!-- 
RSS generated by JIRA (1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d) at Thu Feb 08 23:19:43 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>FOLIO Jira</title>
    <link>https://folio-org.atlassian.net</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>1001.0.0-SNAPSHOT</version>
        <build-number>100246</build-number>
        <build-date>07-02-2024</build-date>
    </build-info>

<item>
            <title>[MODCAL-51] Performance of checking out items degrades drastically when service point calendars defined for years into the future</title>
                <link>https://folio-org.atlassian.net/browse/MODCAL-51</link>
                <project id="10197" key="MODCAL">mod-calendar</project>
                    <description>&lt;p&gt;I defined open hours for 4 service points in Lehigh&apos;s FOLIO test instance and extended them out to 2030 because we do loans that are a year long.  In testing circulation, I found that it was taking almost a minute to checkout a single item.  When I watched the database&apos;s logs, I found that the problem was with the query reproduced below, which is used to determine when the Library is open around the due date of the loan.  I executed the query manually and observed that it took 50 seconds to finish with the calendars going out that far.  I checked mod-calendar&apos;s actual_opening_hours table and found that it had ~16000 rows in it.  I trimmed the calendars for the service points back to only extending out to 1/1/2021, leaving ~1800 rows in the actual_opening_hours table, and then it only took ~2 seconds to checkout an item.  Here is the problematic query:&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;WITH openings_ids as (SELECT jsonb-&amp;gt;&amp;gt;&apos;id&apos; opening_id FROM lu_mod_calendar.openings WHERE jsonb-&amp;gt;&amp;gt;&apos;servicePointId&apos; = &apos;e89641e5-fa6f-45bc-a5a2-ba9f1f7c6baa&apos;),closest_open_day as (SELECT aoh1.jsonb-&amp;gt;&amp;gt;&apos;actualDay&apos; actual_day FROM lu_mod_calendar.actual_opening_hours aoh1 WHERE aoh1.jsonb-&amp;gt;&amp;gt;&apos;openingId&apos; IN (SELECT opening_id FROM openings_ids) AND aoh1.jsonb-&amp;gt;&amp;gt;&apos;actualDay&apos; &amp;gt; &apos;2020-10-08T00:00:00.000+0000&apos; AND aoh1.jsonb-&amp;gt;&amp;gt;&apos;open&apos; = &apos;true&apos; AND (SELECT count(_id) FROM lu_mod_calendar.actual_opening_hours aoh2 WHERE aoh2.jsonb-&amp;gt;&amp;gt;&apos;openingId&apos; IN (SELECT opening_id FROM openings_ids) AND aoh2.jsonb-&amp;gt;&amp;gt;&apos;actualDay&apos; = aoh1.jsonb-&amp;gt;&amp;gt;&apos;actualDay&apos; AND aoh2.jsonb-&amp;gt;&amp;gt;&apos;exceptional&apos; = &apos;true&apos; AND aoh2.jsonb-&amp;gt;&amp;gt;&apos;open&apos; = &apos;false&apos;) = 0 ORDER BY aoh1.jsonb-&amp;gt;&amp;gt;&apos;actualDay&apos; asc LIMIT 1)SELECT jsonb FROM lu_mod_calendar.actual_opening_hours WHERE jsonb-&amp;gt;&amp;gt;&apos;openingId&apos; IN (SELECT opening_id FROM openings_ids) AND jsonb-&amp;gt;&amp;gt;&apos;actualDay&apos; = (SELECT actual_day FROM closest_open_day)&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Perhaps an index is missing?  Either that, or a more efficient way of finding the next available date the library is open is needed, because it&apos;s quite realistic for a library to define hours extending out for years.&lt;/p&gt;</description>
                <environment></environment>
        <key id="75628">MODCAL-51</key>
            <summary>Performance of checking out items degrades drastically when service point calendars defined for years into the future</summary>
                <type id="10001" iconUrl="https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10303?size=medium">Bug</type>
                                            <priority id="10005" iconUrl="https://dev.folio.org/assets/jira-priority/tbd.svg">TBD</priority>
                        <status id="6" iconUrl="https://folio-org.atlassian.net/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10001">Duplicate</resolution>
                                                        <assignee accountid="-1">Unassigned</assignee>
                                                                <reporter accountid="557058:35daa6e0-6bac-4230-bf71-47fd0b9e2f91">Christopher Creswell</reporter>
                                    <labels>
                            <label>performance</label>
                    </labels>
                <created>Thu, 10 Oct 2019 19:03:41 +0000</created>
                <updated>Tue, 15 Oct 2019 10:47:19 +0000</updated>
                            <resolved>Fri, 11 Oct 2019 13:33:47 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                <comments>
                                                            <comment id="181861" author="557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d" created="Thu, 10 Oct 2019 19:42:39 +0000"  >&lt;p&gt; &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A925f55a1-465f-4875-8818-49cbe9a45838&quot; class=&quot;user-hover&quot; rel=&quot;557058:925f55a1-465f-4875-8818-49cbe9a45838&quot; data-account-id=&quot;557058:925f55a1-465f-4875-8818-49cbe9a45838&quot; accountid=&quot;557058:925f55a1-465f-4875-8818-49cbe9a45838&quot; rel=&quot;noreferrer&quot;&gt;Kostyantyn Khodarev&lt;/a&gt; &lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=62a96ae7192edb006f9f1bf9&quot; class=&quot;user-hover&quot; rel=&quot;62a96ae7192edb006f9f1bf9&quot; data-account-id=&quot;62a96ae7192edb006f9f1bf9&quot; accountid=&quot;62a96ae7192edb006f9f1bf9&quot; rel=&quot;noreferrer&quot;&gt;Khalilah Gambrell&lt;/a&gt; I&apos;ve moved this to mod-calendar based on description &amp;#8211; can you please investigate?&lt;/p&gt;</comment>
                                                            <comment id="181862" author="557058:4f6bed01-40a6-48d5-8471-7ef21f5ea97c" created="Fri, 11 Oct 2019 05:59:18 +0000"  >&lt;p&gt;This was addressed in 
    &lt;span class=&quot;jira-issue-macro resolved&quot; data-jira-key=&quot;MODCAL-50&quot; &gt;
                &lt;a href=&quot;https://folio-org.atlassian.net/browse/MODCAL-50&quot; class=&quot;jira-issue-macro-key issue-link&quot;  title=&quot;Add indexes to improve /calendar/periods/{servicePointId}/calculateopening performance&quot; &gt;
            &lt;img class=&quot;icon&quot; src=&quot;https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10318?size=medium&quot; /&gt;
            MODCAL-50
        &lt;/a&gt;
                                                    &lt;span class=&quot;aui-lozenge aui-lozenge-subtle aui-lozenge-success jira-macro-single-issue-export-pdf&quot;&gt;Closed&lt;/span&gt;
            &lt;/span&gt;
, but apparently was not released.&lt;/p&gt;</comment>
                                                            <comment id="181863" author="557058:925f55a1-465f-4875-8818-49cbe9a45838" created="Tue, 15 Oct 2019 10:47:19 +0000"  >&lt;p&gt;&lt;a href=&quot;https://folio-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Ab8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; class=&quot;user-hover&quot; rel=&quot;557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; data-account-id=&quot;557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; accountid=&quot;557058:b8e64633-1f7c-402d-9caf-9959a5ba5d0d&quot; rel=&quot;noreferrer&quot;&gt;Jakub Skoczen&lt;/a&gt; Should bugfix release be issues for mod-calendar with 
    &lt;span class=&quot;jira-issue-macro resolved&quot; data-jira-key=&quot;MODCAL-50&quot; &gt;
                &lt;a href=&quot;https://folio-org.atlassian.net/browse/MODCAL-50&quot; class=&quot;jira-issue-macro-key issue-link&quot;  title=&quot;Add indexes to improve /calendar/periods/{servicePointId}/calculateopening performance&quot; &gt;
            &lt;img class=&quot;icon&quot; src=&quot;https://folio-org.atlassian.net/rest/api/2/universal_avatar/view/type/issuetype/avatar/10318?size=medium&quot; /&gt;
            MODCAL-50
        &lt;/a&gt;
                                                    &lt;span class=&quot;aui-lozenge aui-lozenge-subtle aui-lozenge-success jira-macro-single-issue-export-pdf&quot;&gt;Closed&lt;/span&gt;
            &lt;/span&gt;
 fix?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="75627">MODCAL-50</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummarycf">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10057" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Development Team</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10187"><![CDATA[Vega]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10019" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i009d3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10020" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10024" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>[CHART] Date of First Response</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 10 Oct 2019 19:42:39 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10025" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>[CHART] Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>