gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Praxis encounter location slow to populate


From: Busser, Jim
Subject: Re: [Gnumed-devel] Praxis encounter location slow to populate
Date: Thu, 5 Jun 2014 20:05:40 +0000

On 2014-06-05, at 12:13 PM, Karsten Hilbert <address@hidden>
 wrote:

> On Thu, Jun 05, 2014 at 05:48:29PM +0000, Jim Busser wrote:
> 
>> On running the script, my terminal showed the appended.
>> 
>> Should the changes be immediately active?
>> 
>> I ask because the output of the queries looks unimproved … maybe postgres is 
>> failing to take advantage of the index?
> 
> Maybe so, perhaps because the LEFT JOIN constrains the
> planner more than an INNER JOIN would. Since semantically an
> INNER JOIN will do just what is needed I have modified the
> relevant views to use that (along with taking out a subquery
> not necessary for the v_praxis_branches view.
> 
> Please run the attached files against your database (first
> the *org* one, then the *branch* one) and re-report the
> results of the queries we used to analyze query execution.
> 
> Those changes will, again, be part of the next bugfix release.

Not a big difference, as I can see …

        http://explain.depesz.com/s/rDS5
        http://explain.depesz.com/s/r8Dd

-- Jim

gnumed_v19=> \i ~/Desktop/v19-dem-v_orgs_v_org_units-fixup.sql
SET
CREATE VIEW
psql:/Users/djb/Desktop/v19-dem-v_orgs_v_org_units-fixup.sql:38: NOTICE:  view 
"v_orgs_no_praxis_check" does not exist, skipping
DROP VIEW
CREATE VIEW
GRANT
CREATE VIEW
psql:/Users/djb/Desktop/v19-dem-v_orgs_v_org_units-fixup.sql:95: NOTICE:  view 
"v_org_units_no_praxis_check" does not exist, skipping
DROP VIEW
CREATE VIEW
GRANT
       log_script_insertion       
----------------------------------
 9765373098b03fb208332498f34cd4b5
(1 row)

gnumed_v19=> \i ~/Desktop/v19-dem-v_praxis_branches-fixup.sql
SET
DROP VIEW
CREATE VIEW
COMMENT
GRANT
       log_script_insertion       
----------------------------------
 9765373098b03fb208332498f34cd4b5
(1 row)

======
end




reply via email to

[Prev in Thread] Current Thread [Next in Thread]