src-test/.project
author Inigo Sanchez <inigo.sanchez@openbravo.com>
Wed, 11 Mar 2015 10:42:05 +0100
changeset 26161 3610bd347abc
parent 24247 a0955a83d426
child 27134 a74e6f6207c1
permissions -rw-r--r--
Fixed issue 28968: When installing a module the rebuild takes long to start.

The problem was that when installing a module the rebuild takes long to start.
This happened on environments with a lot of rows (Tested with 260.000 rows) on
the ad_session table.The result was this:

explain UPDATE AD_SESSION SET SESSION_ACTIVE='N' WHERE CREATEDBY<>'100'
Update on ad_session (cost=0.00..21546.15 rows=266303 width=147)

-> Seq Scan on ad_session (cost=0.00..21546.15 rows=266303 width=147)
Filter: ((createdby)::text <> '100'::text)
Approx time execution: 30000 ms

The new SQL Query to update is this:

explain UPDATE AD_SESSION SET SESSION_ACTIVE='N' WHERE CREATEDBY<>'100' and SESSION_ACTIVE='Y'
Update on ad_session (cost=0.42..4.44 rows=1 width=147)

-> Index Scan using ad_session_active_idx on ad_session (cost=0.42..4.44 rows=1 width=147)
Index Cond: (session_active = 'Y'::bpchar)
Filter: ((createdby)::text <> '100'::text)
Approx time execution: 30 ms

Adding the new condition "SESSION_ACTIVE = 'Y'" has been achieved to improve the performance.
asier@24247
     1
<?xml version="1.0" encoding="UTF-8"?>
asier@24247
     2
<projectDescription>
asier@24247
     3
	<name>OpenbravoTest</name>
asier@24247
     4
	<comment></comment>
asier@24247
     5
	<projects>
asier@24247
     6
	</projects>
asier@24247
     7
	<buildSpec>
asier@24247
     8
		<buildCommand>
asier@24247
     9
			<name>org.eclipse.jdt.core.javabuilder</name>
asier@24247
    10
			<arguments>
asier@24247
    11
			</arguments>
asier@24247
    12
		</buildCommand>
asier@24247
    13
	</buildSpec>
asier@24247
    14
	<natures>
asier@24247
    15
		<nature>org.eclipse.jdt.core.javanature</nature>
asier@24247
    16
	</natures>
asier@24247
    17
</projectDescription>