Postgres profile report (StartID: 428, EndID: 451)

pg_profile version 0.3.6

Server name: local

Report interval: 2026-07-17 04:00:02+02 - 2026-07-18 03:00:01+02

Warning!Report includes 23 sample(s) with setting pg_stat_statements.track = all.Value of %Total columns may be incorrect.

Report sections

Server statistics

Database statistics

DatabaseTransactionsBlock statisticsTuplesTemp filesSizeGrowth
CommitsRollbacksDeadlocksHit(%)ReadHitRetFetInsUpdDelSizeFiles
openbravo1265511638100.00594963298438520183800691213647495512637627389915401724 GB1721790720 GB139 MB
postgres11705100.0065838519016673480486367 kB
Total1382561638100.00594963299096905183990857913650975992637627389915401724 GB1721790720 GB139 MB

Statement statistics by database

DatabaseCallsTime (s)Fetched (blk)Dirtied (blk)Temp (blk)Local (blk)Statements
ExecReadWriteTrgSharedLocalSharedLocalReadWriteReadWrite
openbravo5810375917774.6419.523468814947520027370613831984671420638
postgres561211.4186779345
template163486.137176276
Total5811571917792.1919.523468908902520027370613831984671421259

Cluster statistics

MetricValue
Scheduled checkpoints276
Requested checkpoints
Checkpoint write time (s)32132.58
Checkpoint sync time (s)6.81
Checkpoints buffers written410325
Background buffers written
Backend buffers written19557
Backend fsync count
Bgwriter interrupts (too many buffers)
Number of buffers allocated59496
WAL generated2664 MB
WAL segments archived
WAL segments archive failed

Tablespace statistics

TablespacePathSizeGrowth
pg_default21 GB139 MB
pg_global766 kB

SQL query statistics

Top SQL by execution time

Query IDDatabaseExec (s)%TotalRowsExecution times (ms)Executions
MeanMinMaxStdErr

29bf42b1ab

[7d43ad7e]

openbravo8827.2049.61132959591103400.4321094809.8061113962.3585952.9548

4af3e2b8c4

[26c6f357]

openbravo5577.9231.35634623697239.769683423.995711387.3857954.6108

3f546d3e2b

[a0643fcb]

openbravo463.342.60784646857917.01856654.53860358.3581254.7688

fe2c4fe6df

[4c390f69]

openbravo250.681.41511096631334.83820970.62240243.8316664.8828

241cae8477

[42430e3c]

openbravo219.591.23572188527448.25020622.60634025.1924545.4708

c5df179779

[2870663b]

openbravo179.961.01139305820.0130.0069.2400.00613930582

b52b0c82ea

[4f5926de]

openbravo167.420.94271678320927.12814614.55329969.6824698.8768

a3d3811d66

[3933d71e]

openbravo143.180.802582603.32814.83222493.7086841.87655

9149f0fdfa

[85673f33]

openbravo136.150.77216630.3186.0926003.6721332.583216

08db126a91

[b0ebb687]

openbravo125.290.70304076015661.32813457.79817148.6571172.4868

f0238ffe1b

[806faf8c]

openbravo77.500.4459235077495.63877495.63877495.6381

018c5dd71e

[eb509fc7]

openbravo75.370.4227167359421.6199066.89610571.908469.5768

0b24cb5d2f

[738f9776]

openbravo74.940.4258710474938.79574938.79574938.7951

61aed5765c

[9c0a6d60]

openbravo68.540.395211958.3841914.2722160.98647.57935

d3dcdac298

[ce4e88c2]

openbravo60.570.34137279880.0040.0035.5620.00313727988

33f5216a17

[5b59cf42]

openbravo60.130.34139305820.0040.0038.2280.00313930582

24e13ace2f

[1e425839]

openbravo58.350.33227272083.9932056.4992262.23736.49028

7e35c14916

[be51200d]

openbravo49.940.282067466.704434.047548.46117.332107

fb45d4a61f

[61e8ee09]

openbravo46.210.2610011552.78511456.15811651.75373.7814

225c51d0db

[ab242de4]

openbravo45.260.2514219945257.22445257.22445257.2241

Top SQL by executions

Query IDDatabaseExecutions%TotalRowsMean(ms)Min(ms)Max(ms)StdErr(ms)Elapsed(s)

c5df179779

[2870663b]

openbravo1393058223.97139305820.0130.0069.2400.006180.0

33f5216a17

[5b59cf42]

openbravo1393058223.97139305820.0040.0038.2280.00360.1

75c88383e3

[196c6f74]

openbravo1393058223.97139305820.0030.0021.8400.00139.6

d3dcdac298

[ce4e88c2]

openbravo1372798823.62137279880.0040.0035.5620.00360.6

19825253ef

[cf182c3a]

openbravo3803200.65105920.0280.0078.5060.05710.6

8e8235137e

[b19ed954]

openbravo1285170.221285170.0090.0033.6510.0161.1

5f8e9d0065

[8e21a910]

openbravo1241680.211241680.0070.0021.2190.0090.9

74a1d87233

[3cb4d968]

openbravo1225450.211225450.0030.0028.0260.0240.4

0483033486

[2e63909b]

openbravo999540.17340210.0050.0030.7560.0040.5

93a759b1da

[6f9b1a85]

openbravo942110.160.0020.0000.3250.0020.1

9455753479

[2049516b]

openbravo925920.160.0010.0000.2340.0010.1

caede7e47b

[3051ec96]

openbravo565230.10565230.2450.105152.7441.95213.9

1eec949137

[6b7612aa]

openbravo416890.07416890.0030.0020.0580.0010.1

3ca20ddb6c

[afe3cf8b]

openbravo397350.07397350.0240.0111.4510.0251.0

3e80950586

[5c26872c]

openbravo235030.04235030.0150.0070.8550.0120.4

bf60147669

[9e09aee4]

openbravo180980.03180980.0490.0123.4250.0370.9

d1e21ddf3e

[c78d8d00]

openbravo177680.03177680.4070.03316.6110.2357.2

27b400c7db

[8a770ed5]

openbravo172860.03172860.0840.0165.9150.1181.4

f6ccd5bccc

[231ef314]

openbravo166130.03166130.7310.15717.2160.41312.1

bb4767275d

[c28fb106]

openbravo166130.03166130.0040.0020.4820.0050.1

Top SQL by shared blocks fetched

Query IDDatabaseblks fetched%TotalHits(%)Elapsed(s)RowsExecutions

4af3e2b8c4

[26c6f357]

openbravo254543805073.38100.005577.96346238

3f546d3e2b

[a0643fcb]

openbravo1891422485.45100.00463.378464688

29bf42b1ab

[7d43ad7e]

openbravo1228992363.54100.008827.2132959598

241cae8477

[42430e3c]

openbravo760323582.19100.00219.657218858

a3d3811d66

[3933d71e]

openbravo589446161.70100.00143.225855

9149f0fdfa

[85673f33]

openbravo586309701.69100.00136.1216216

b52b0c82ea

[4f5926de]

openbravo491516631.42100.00167.427167838

08db126a91

[b0ebb687]

openbravo480641801.39100.00125.330407608

c5df179779

[2870663b]

openbravo417917461.20100.00180.01393058213930582

d3dcdac298

[ce4e88c2]

openbravo274559760.79100.0060.61372798813727988

018c5dd71e

[eb509fc7]

openbravo273787410.79100.0075.427167358

61aed5765c

[9c0a6d60]

openbravo247569460.71100.0068.552135

fe2c4fe6df

[4c390f69]

openbravo218951510.63100.00250.751109668

133291c890

[be089ba]

openbravo164768920.47100.0034.16

75c88383e3

[196c6f74]

openbravo139305820.40100.0039.61393058213930582

33f5216a17

[5b59cf42]

openbravo139305820.40100.0060.11393058213930582

0a9b2d6035

[68af0d51]

openbravo111562670.32100.0020.56

12a0f36339

[acae3908]

openbravo108814600.31100.0040.7171171

9c8be0ed8f

[4fe628d8]

openbravo69240900.20100.0012.65

19825253ef

[cf182c3a]

openbravo67741110.20100.0010.610592380320

Top SQL by shared blocks read

Query IDDatabaseReads%TotalHits(%)Elapsed(s)RowsExecutions

caede7e47b

[3051ec96]

openbravo771410.8499.4913.95652356523

181fd1b092

[b76c5e2]

openbravo32244.5395.871.818871887

f3f57fdf42

[4ae26da8]

openbravo28684.0399.385.188

a874297fd2

[67d29389]

openbravo28684.0399.385.188

017d00aa12

[a852adf9]

openbravo27663.8996.851.1178636

8cb37f78ee

[e2543c48]

openbravo25073.5298.932.916641664

4f42690015

[38c3f6e1]

openbravo23563.3198.771.6178636

2d19e5b311

[b34f1d1f]

openbravo23223.2694.442.010461046

604436a476

[3afdf1db]

openbravo20602.8998.201.128172817

70caf7bb1e

[f7c054b4]

openbravo20602.8994.981.410601060

f35b64cb44

[32f116de]

openbravo17912.5299.741.5152

8d633ecaab

[ee4ba68d]

openbravo17372.4497.050.811941194

616a44c111

[97aab45d]

openbravo17052.4095.351.310221022

3ff50f5232

[e81c3c12]

openbravo15492.1894.850.910271027

68de33d5d7

[ca50d0e4]

openbravo12741.7998.421.011001100

24f0f61153

[84a8bcfc]

openbravo12601.7798.801.2878878

66bc870e45

[d37bd6d7]

openbravo11831.6697.540.7865865

d1c0672c81

[a1b7c5f]

openbravo10261.4499.171.913911391

6b67fe6923

[5d2e4e6c]

openbravo9691.3699.071.312521252

313b1ecda9

[978c2f22]

openbravo9511.3499.523.869876987

Top SQL by shared blocks dirtied

Query IDDatabaseDirtied%TotalHits(%)Elapsed(s)RowsExecutions

caede7e47b

[3051ec96]

openbravo12730424.4899.4913.95652356523

382d19fc6d

[40fd3671]

openbravo189143.64100.0039.223

905bffc89c

[92975a8e]

openbravo189143.64100.0039.22323

f3f57fdf42

[4ae26da8]

openbravo137902.6599.385.188

a874297fd2

[67d29389]

openbravo137902.6599.385.188

50e85a5d5e

[fed47e50]

openbravo100521.9399.979.416411641

4f42690015

[38c3f6e1]

openbravo98151.8998.771.6178636

8cb37f78ee

[e2543c48]

openbravo97281.8798.932.916641664

528c231cbe

[b1de800e]

openbravo87081.6799.761.050805080

48f140c821

[edb3cd2d]

openbravo82061.5899.850.7177735

4f9621bcb7

[ddcc675a]

openbravo79761.5399.391.5514514

313b1ecda9

[978c2f22]

openbravo73611.4299.523.869876987

fe62dd3708

[fcea205c]

openbravo72011.3898.880.715021502

24f0f61153

[84a8bcfc]

openbravo60381.1698.801.2878878

d1c0672c81

[a1b7c5f]

openbravo57901.1199.171.913911391

659ec453a2

[ce600362]

openbravo56821.0999.331.511011101

68de33d5d7

[ca50d0e4]

openbravo55951.0898.421.011001100

2d19e5b311

[b34f1d1f]

openbravo55781.0794.442.010461046

616a44c111

[97aab45d]

openbravo53451.0395.351.310221022

181fd1b092

[b76c5e2]

openbravo53071.0295.871.818871887

Top SQL by shared blocks written

No data in this section

Top SQL by temp usage

Query IDDatabaseLocal fetchedHits(%)Local (blk)Temp (blk)Elapsed(s)RowsExecutions
Write%TotalRead%TotalWrite%TotalRead%Total

29bf42b1ab

[7d43ad7e]

openbravo1783410389.863504798994.578827.2132959598

241cae8477

[42430e3c]

openbravo11357805.7211364043.07219.657218858

7e35c14916

[be51200d]

openbravo3096691.563095620.8449.92067107

24e13ace2f

[1e425839]

openbravo2589041.302590720.7058.42272728

fe2c4fe6df

[4c390f69]

openbravo1571630.791572590.42250.751109668

fb45d4a61f

[61e8ee09]

openbravo1413550.711413510.3846.21004

d3457bdce0

[25bcd965]

openbravo97400.0597460.034.28511

Complete list of SQL texts

QueryIDQuery Text
d1c0672c81insert into M_InOutLine (AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, Line, Description, M_InOut_ID, C_OrderLine_ID, M_Locator_ID, M_Product_ID, C_UOM_ID, MovementQty, IsInvoiced, M_AttributeSetInstance_ID, IsDescription, Manage_Prereservation, C_Bpartner_ID, Explode, EM_Obwpl_Editlines_Pe, EM_Obwpl_Removeline, Salesrep_ID, EM_Prpp_Qtyverified, EM_Pruti_Voidlines, EM_Pruti_Isvoid, M_InOutLine_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28)
181fd1b092insert into C_OrderLineTax (C_Orderline_ID, C_Tax_ID, AD_Client_ID, AD_Org_ID, Isactive, Created, Createdby, Updated, Updatedby, Taxbaseamt, Taxamt, Line, C_Order_ID, C_Orderlinetax_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14)
133291c890SELECT * FROM (select bp.c_bpartner_id AS REFERENCEKEY_ID, $2 AS AD_ROLE_ID, $3 AS AD_USER_ID, $4 || AD_COLUMN_IDENTIFIER($5, bp.C_BPARTNER_ID, $6) || $7 AS DESCRIPTION, $8 AS ISACTIVE, bp.AD_ORG_ID AS AD_ORG_ID, bp.AD_CLIENT_ID AS AD_CLIENT_ID, now() AS CREATED, $9 AS CREATEDBY, now() AS UPDATED, $10 AS UPDATEDBY, AD_COLUMN_IDENTIFIER($11, bp.C_BPARTNER_ID, $12) AS RECORD_ID from c_bpartner bp where not exists (select $13 from c_bpartner_location bpl0 where bpl0.c_bpartner_id = bp.c_bpartner_id and bpl0.istaxlocation = $14 ) and exists (select $15 from c_bpartner_location bpl inner join c_location l on (bpl.c_location_id = l.c_location_id) where bpl.c_bpartner_id = bp.c_bpartner_id group by bpl.c_bpartner_id having count(distinct(l.c_country_id)) > $16 )) AAA where not exists (select $17 from ad_alert a where a.ad_alertrule_id = $1 and a.referencekey_id = aaa.referencekey_id and coalesce(a.status, $18) != $19)
75c88383e3SELECT COUNT(*) FROM M_COSTING WHERE p_MovementDate BETWEEN DATEFROM AND DATETO AND M_PRODUCT_ID = p_Product_ID AND costtype NOT IN ($8 , $9) AND(v_CostType IS NULL OR v_CostType = COSTTYPE)
24e13ace2fSELECT DISTINCT ON (bp.c_bpartner_id) bp.c_bpartner_id, bp.updated, bp.AD_Language, CAST(bp.birthday AS varchar), bp.is_customer_consent, bp.isactive, usr.created, usr.firstname, usr.lastname, usr.commercialauth, usr.em_izir_updated_optin AS updatedCommercialauth, usr.email, usr.viasms, usr.viaemail, usr.phone, c_country.countrycode AS description /*Replace by countrycode*/, c_location.regionname, c_location.postal, c_location.city, c_location.address1, grt.name, grp.value, created_user.default_ad_org_id AS created_by_org FROM c_bpartner bp LEFT JOIN ad_user usr ON bp.c_bpartner_id = usr.c_bpartner_id LEFT JOIN c_bpartner_location ON bp.c_bpartner_id = c_bpartner_location.c_bpartner_id LEFT JOIN c_location ON c_bpartner_location.c_location_id = c_location.c_location_id LEFT JOIN c_country ON c_country.c_country_id = c_location.c_country_id LEFT JOIN c_greeting grt ON bp.c_greeting_id = grt.c_greeting_id LEFT JOIN c_bp_group grp ON bp.c_bp_group_id = grp.c_bp_group_id LEFT JOIN ad_user created_user ON bp.createdby = created_user.ad_user_id WHERE ( bp.updated >= now() - $1 OR usr.updated >= now() - $2 )
9455753479COMMIT
f6ccd5bcccSELECT AD_COLUMN_IDENTIFIER(p_TableName, p_Record_ID, v_Language ) FROM DUAL
d3457bdce0SELECT c_country.countrycode as "Code Pays", SUBSTRING(c_order.ad_org_id,$1,$2) as "Code magasin", ad_org.name as "Nom magasin", TO_CHAR(c_order.dateordered::date, $3) as Date, SUM(c_orderline.linenetamt) As "CA HT", $4 As Traffic, COUNT(DISTINCT CASE WHEN subquery.total_linenetamt > $5 THEN c_order.c_order_id ELSE $6 END) - COUNT(DISTINCT CASE WHEN subquery.total_linenetamt < $7 THEN c_order.c_order_id ELSE $8 END) AS "Nombre de tickets" FROM c_orderline INNER JOIN c_order ON c_orderline.c_order_id = c_order.c_order_id LEFT JOIN ad_org ON c_order.ad_org_id = ad_org.ad_org_id LEFT JOIN c_country ON ad_org.em_obretco_dbp_countryid = c_country.c_country_id INNER JOIN ( SELECT c_order_id, SUM(linenetamt) AS total_linenetamt FROM c_orderline GROUP BY c_order_id ) AS subquery ON c_orderline.c_order_id = subquery.c_order_id WHERE c_order.issotrx = $9 AND c_orderline.qtyordered <> $10 AND c_order.dateordered >= CURRENT_DATE - INTERVAL $11 GROUP BY TO_CHAR(c_order.dateordered::date, 'yyyy-mm-dd'), c_country.countrycode, c_order.ad_org_id, ad_org.name
4af3e2b8c4select "_"."m_warehouse_id" as "m_warehouse_id", "_"."ad_org_id" as "ad_org_id", "_"."Almacén" as "Entrepot", "_"."Ubicación" as "Emplacement", "_"."m_product_id" as "m_product_id", "_"."Cantidad" as "Qté stock", "_"."Cantidad Reservada" as "Quantite Reserve", "_"."Valoración Inventario" as "Valo PA HT Stock", "_"."last_purchase" as "last_purchase" from ( select w.m_warehouse_id , sd.ad_org_id , w.name as "Almacén" , l.value as "Ubicación" , sd.m_product_id , sd.qtyonhand "Cantidad" , sd.reservedqty "Cantidad Reservada" , round(coalesce(sd.qtyonhand * coalesce(m_get_cost(sd.m_product_id,now()::timestamp,$1,sd.ad_org_id, sd.ad_client_id,$2,$3,$4),$5),$6),$7) as "Valoración Inventario" ,(SELECT coalesce(MAX(m_inout.movementdate), current_date) FROM m_inoutline LEFT JOIN m_inout on m_inoutline.m_inout_id=m_inout.m_inout_id WHERE m_inout.docstatus<>$8 and m_inout.issotrx = $9 and m_inoutline.m_product_id = sd.m_product_id) as "last_purchase" from m_storage_detail sd inner join m_locator l on l.m_locator_id = sd.m_locator_id inner join m_warehouse w on w.m_warehouse_id = l.m_warehouse_id ) "_"
c5df179779SELECT ot.islegalentity FROM ad_org o JOIN ad_orgtype ot ON o.ad_orgtype_id = ot.ad_orgtype_id WHERE o.ad_org_id = p_org_id
0483033486SELECT LEVELNO FROM AD_ORG_TREE WHERE AD_ORG_ID = p_orgid AND AD_PARENT_ORG_ID = p_parentorgid AND AD_CLIENT_ID = p_clientid
caede7e47binsert into obmobc_logclient ( obmobc_logclient_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, tstamp, deviceid, context, msg, loglevel, cache_session_id, isonline ) values ( $1, $2, $3, $15, to_timestamp(to_char($4), to_char($16)), $5, to_timestamp(to_char($6), to_char($17)), $7, to_number($8), $9, $10, $11, $12, $13, $14 )
f35b64cb44select aduser0_.AD_User_ID as ad_user_1_128_, aduser0_.AD_Client_ID as ad_clien2_128_, aduser0_.AD_Org_ID as ad_org_i3_128_, aduser0_.IsActive as isactive4_128_, aduser0_.Created as created5_128_, aduser0_.CreatedBy as createdb6_128_, aduser0_.Updated as updated7_128_, aduser0_.UpdatedBy as updatedb8_128_, aduser0_.Name as name9_128_, aduser0_.Description as descrip10_128_, aduser0_.Password as passwor11_128_, aduser0_.Email as email12_128_, aduser0_.Supervisor_ID as supervi13_128_, aduser0_.C_BPartner_ID as c_bpart14_128_, aduser0_.Processing as process15_128_, aduser0_.EmailUser as emailus16_128_, aduser0_.EmailUserPW as emailus17_128_, aduser0_.C_BPartner_Location_ID as c_bpart18_128_, aduser0_.C_Greeting_ID as c_greet19_128_, aduser0_.Title as title20_128_, aduser0_.Comments as comment21_128_, aduser0_.Phone as phone22_128_, aduser0_.Phone2 as phone23_128_, aduser0_.Fax as fax24_128_, aduser0_.LastContact as lastcon25_128_, aduser0_.LastResult as lastres26_128_, aduser0_.Birthday as birthda27_128_, aduser0_.AD_OrgTrx_ID as ad_orgt28_128_, aduser0_.Firstname as firstna29_128_, aduser0_.Lastname as lastnam30_128_, aduser0_.UserName as usernam31_128_, aduser0_.Default_Ad_Client_ID as default32_128_, aduser0_.Default_Ad_Language as default33_128_, aduser0_.Default_Ad_Org_ID as default34_128_, aduser0_.Default_Ad_Role_ID as default35_128_, aduser0_.Default_M_Warehouse_ID as default36_128_, aduser0_.IsLocked as islocke37_128_, aduser0_.AD_Image_ID as ad_imag38_128_, aduser0_.Grant_Portal_Access as grant_p39_128_, aduser0_.LastPasswordUpdate as lastpas40_128_, aduser0_.Isexpiredpassword as isexpir41_128_, aduser0_.Commercialauth as commerc42_128_, aduser0_.EM_OBPOS_Default_Pos_Role as em_obpo43_128_, aduser0_.Viasms as viasms44_128_, aduser0_.Viaemail as viaemai45_128_, aduser0_.Update_Password as update_46_128_, aduser0_.EM_Izir_Updated_Optin as em_izir47_128_, aduser0_.Issalesrep as issales48_128_, aduser0_.EM_Izir_Updated_Optout as em_izir49_128_, aduser0_.EM_Pruti_Isbillingcontact as em_prut50_128_, aduser0_.EM_Pruti_Isordercontact as em_prut51_128_, aduser0_.EM_Pruti_Ispurchaseordcontact as em_prut52_128_, aduser0_.EM_OBRETCO_Default_Pos_Contact as em_obre53_128_ from AD_User aduser0_ where (upper(aduser0_.Email) like upper($1) escape $62) and (aduser0_.C_BPartner_ID is null or exists (select businesspa1_.C_BPartner_ID from C_BPartner businesspa1_ where businesspa1_.C_BPartner_ID=aduser0_.C_BPartner_ID and (businesspa1_.IsEmployee=$63 or businesspa1_.SalesRep_ID=$64))) and (aduser0_.AD_Org_ID in ($2 , $3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39 , $40 , $41 , $42 , $43 , $44 , $45 , $46 , $47 , $48 , $49 , $50 , $51 , $52 , $53 , $54 , $55 , $56 , $57 , $58)) and (aduser0_.AD_Client_ID in ($59 , $60)) order by aduser0_.Name, aduser0_.AD_User_ID limit $61
4f42690015insert into c_invoiceline (c_invoiceline_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, c_invoice_id, c_orderline_id, m_inoutline_id, line, description, m_product_id, qtyinvoiced, pricelist, priceactual, pricelimit, linenetamt, c_uom_id, c_tax_id, m_attributesetinstance_id, pricestd, taxbaseamt, line_gross_amount, gross_unit_price, c_bpartner_id, grosspricestd, grosspricelist, a_asset_id, c_project_id, user1_id, user2_id, c_costcenter_id) select get_uuid(), i.ad_client_id, i.ad_org_id, $3, i.created, i.createdby, i.updated, i.updatedby, i.c_invoice_id, ol.c_orderline_id, max(iol.m_inoutline_id), row_number() over (partition by i.c_invoice_id order by o.documentno, ol.line) * $5 as line, ol.description, ol.m_product_id, ol.qtyordered, ol.pricelist, ol.priceactual, ol.pricelimit, ol.linenetamt, ol.c_uom_id, ol.c_tax_id, ol.m_attributesetinstance_id, ol.pricestd, ol.linenetamt , (case when pl.istaxincluded = $6 then ol.line_gross_amount else $7 end), ol.gross_unit_price, ol.c_bpartner_id, ol.grosspricestd, ol.grosspricelist, ol.a_asset_id, ol.c_project_id, ol.user1_id, ol.user2_id, ol.c_costcenter_id from c_order o, m_pricelist pl, obpos_applications ap, ad_org org, c_doctype dt, c_invoice i, c_orderline ol left join m_inoutline iol on ol.c_orderline_id = iol.c_orderline_id where ol.c_order_id = o.c_order_id and o.m_pricelist_id = pl.m_pricelist_id and o.m_pricelist_id = i.m_pricelist_id and o.em_obpos_applications_id = ap.obpos_applications_id and o.ad_org_id = org.ad_org_id and $8=$9 and o.c_doctype_id = dt.c_doctype_id and dt.c_doctypeaggrinvoice_id = i.c_doctype_id and o.em_obpos_app_cashup_id = $1 and o.em_obpos_islayaway = $10 and o.invoicerule = $11 and (ol.qtyordered <> $12 and ol.em_obpos_isdeleted = $13) and o.c_doctype_id in (org.em_obpos_c_doctype_id, org.em_obpos_c_doctyperet_id) and not exists (select $14 from c_orderline ol2 where ol2.qtyinvoiced <> $15 and ol2.c_order_id = o.c_order_id) and o.em_obpos_notinvoiceoncashup = $16 and o.iscashvat = i.iscashvat and i.documentno = $2 and i.c_bpartner_id = o.c_bpartner_id and coalesce(i.bpartner_extref, n$17) = coalesce(o.bpartner_extref, n$18) and i.c_bpartner_location_id = coalesce(o.billto_id, o.c_bpartner_location_id) and coalesce(i.ad_user_id, $19) = coalesce(o.ad_user_id, $20) group by i.ad_client_id, i.ad_org_id, i.created, i.createdby, i.updated, i.updatedby, i.c_invoice_id, ol.c_orderline_id, ol.description, ol.m_product_id, ol.qtyordered, ol.pricelist, ol.priceactual, ol.pricelimit, ol.linenetamt, ol.c_uom_id, ol.c_tax_id, ol.m_attributesetinstance_id, ol.pricestd, ol.linenetamt , ol.line_gross_amount, ol.gross_unit_price, ol.c_bpartner_id, ol.grosspricestd, ol.grosspricelist, ol.a_asset_id, ol.c_project_id, ol.user1_id, ol.user2_id, ol.c_costcenter_id, pl.istaxincluded, o.documentno, ol.line, o.c_order_id, o.ad_user_id, o.bpartner_extref order by o.documentno, ol.line
a3d3811d66SELECT retstk_product_stock_json($1, $2, f.m_product_id) as stk FROM ( SELECT distinct coalesce(generic_product_id, m_product_id) as m_product_id FROM m_product WHERE EXISTS (SELECT $3 FROM obretco_prol_product WHERE obretco_productlist_id = $4 AND obretco_prol_product.m_product_id = m_product.m_product_id) AND isactive = $5 AND isstocked = $6 AND producttype = $7 AND (sku ilike $8 OR name ilike $9 OR value ilike $10 OR description ilike $11) ) as f
604436a476insert into C_Import_Entry_Archive (AD_Client_ID, AD_Org_ID, Isactive, Created, Createdby, Updated, Updatedby, Imported, Jsoninfo, ImportStatus, Typeofdata, AD_Role_ID, EM_Obpos_Applications_ID, Responseinfo, Isnonblocking, C_Import_Entry_Archive_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16)
74a1d87233SELECT $4 FROM ONLY "profile"."last_stat_database" x WHERE "server_id" OPERATOR(pg_catalog.=) $1 AND "sample_id" OPERATOR(pg_catalog.=) $2 AND "datid" OPERATOR(pg_catalog.=) $3 FOR KEY SHARE OF x
382d19fc6dSELECT * FROM take_sample_subset(1,0)
241cae8477select "_"."fin_payment_detail_v_id" as "fin_payment_detail_v_id", "_"."ad_client_id" as "ad_client_id", "_"."ad_org_id" as "ad_org_id", "_"."c_bpartner_id" as "c_bpartner_id", "_"."c_order_id" as "c_order_id", "_"."orderno" as "Comande No.", "_"."invoiceno" as "Facture No.", "_"."paymentno" as "Paiement No.", "_"."duedate" as "Date comptable", "_"."paymentdate" as "Date de paiement", "_"."invoicedamt" as "Montant de la facture", "_"."expected" as "Attendu", "_"."paidamt" as "Montant payé", "_"."expectedconverted" as "Converti attendu", "_"."paidconverted" as "Payé converti", "_"."paymentmethod" as "Mode de paiement", "_"."status" as "Status" from ( select fpdv.fin_payment_detail_v_id , fpdv.ad_client_id , (case when cd.isreturn = $1 then co.ad_orgtrx_id else fpdv.ad_org_id end) ad_org_id , fpdv.c_bpartner_id , fpdv.fin_payment_sched_ord_v_id as "c_order_id" , fpdv.orderno , fpdv.invoiceno , fpdv.paymentno , fpdv.duedate , fpdv.paymentdate , fpdv.invoicedamt , fpdv.expected , fpdv.paidamt , fpdv.expectedconverted , fpdv.paidconverted , fp.name as "paymentmethod" , fpdv.status from fin_payment_detail_v fpdv left join c_order co on co.c_order_id = fpdv.fin_payment_sched_ord_v_id left join c_doctype cd on co.c_doctype_id = cd.c_doctype_id left join fin_paymentmethod fp on fp.fin_paymentmethod_id = fpdv.fin_paymentmethod_id where co.issotrx = $2 ) "_"
f3f57fdf42SELECT * FROM M_InOut_Post0($1)
fe2c4fe6dfselect "_"."c_order_id" as "c_order_id", "_"."ad_org_id" as "ad_org_id", "_"."isactive" as "isactive", "_"."issotrx" as "issotrx", "_"."m_pricelist_id" as "m_pricelist_id", "_"."Documento" as "Documento", "_"."Estado Pedido" as "Estado Pedido", "_"."Accion Pedido" as "Accion Pedido", "_"."Tipo Documento" as "Tipo Documento", "_"."Descripción" as "Descripción", "_"."Fecha Pedido" as "Fecha Pedido", "_"."Fecha Comprometida" as "Fecha Comprometida", "_"."c_bpartner_id" as "c_bpartner_id", "_"."Referencia Proveedor" as "Referencia Proveedor", "_"."c_currency_id" as "c_currency_id", "_"."Currency ISO" as "Currency ISO", "_"."m_warehouse_id" as "m_warehouse_id", "_"."Ciudad" as "Ciudad", "_"."Codigo Postal" as "Codigo Postal", "_"."Pais" as "Pais", "_"."Region" as "Region", "_"."TPV Name" as "TPV Name", "_"."Vendedor" as "Vendedor", "_"."Nombre y Apellido Vendedor" as "Nombre y Apellido Vendedor", "_"."salesrep_id" as "salesrep_id", cast("_"."Fecha Pedido" as date) as "t0_0", cast("_"."Fecha Comprometida" as date) as "t1_0" from ( select "c_order_id", "ad_org_id", "isactive", "issotrx", "m_pricelist_id", "Documento", "Estado Pedido", "Accion Pedido", "Tipo Documento", "Descripción", "Fecha Pedido", "Fecha Comprometida", "c_bpartner_id", "Referencia Proveedor", "c_currency_id", "Currency ISO", "m_warehouse_id", "Ciudad", "Codigo Postal", "Pais", "Region", "TPV Name", "Vendedor", "Nombre y Apellido Vendedor", "salesrep_id" from ( SELECT O.c_order_id , (case when DT.isreturn = $1 then O.ad_orgtrx_id else O.ad_org_id end) ad_org_id , O.isactive , O.issotrx , O.m_pricelist_id , O.documentno as "Documento" , O.docstatus as "Estado Pedido" , O.docaction as "Accion Pedido" , O.processed as "Procesado" , DT.name as "Tipo Documento" , O.description as "Descripción" , O.dateordered as "Fecha Pedido" , O.datepromised as "Fecha Comprometida" , O.c_bpartner_id , O.poreference "Referencia Proveedor" , O.c_currency_id , cu.iso_code "Currency ISO" , O.m_warehouse_id , cl.city as "Ciudad" , cl.postal as "Codigo Postal" , cc."name" as "Pais" , cr."name" as "Region" , OA."name" as "TPV Name" , coalesce(au.name,$2) as "Vendedor" , concat(coalesce(au.firstname,$3),$4,coalesce(au.lastname,$5)) as "Nombre y Apellido Vendedor" , O.salesrep_id FROM c_order O LEFT JOIN c_doctype DT on DT.c_doctype_id = O.c_doctype_id INNER JOIN c_currency cu on cu.c_currency_id = o.c_currency_id LEFT JOIN c_bpartner_location cbl on cbl.c_bpartner_location_id = O.c_bpartner_location_id LEFT JOIN c_location cl on cl.c_location_id = cbl.c_location_id LEFT JOIN c_country cc on cc.c_country_id = cl.c_country_id LEFT JOIN c_region cr on cr.c_region_id = cl.c_region_id left join obpos_applications OA on OA.obpos_applications_id = O.em_obpos_applications_id left join ad_user au on au.ad_user_id = O.salesrep_id WHERE $6=$7 AND O.issotrx = $8 AND O.dateordered >= CURRENT_DATE - INTERVAL $9 ) "$Table" ) "_"
b52b0c82easelect "_"."c_bpartner_id" as "c_bpartner_id", "_"."Identificador" as "Code du Tiers", "_"."Nombre Fiscal" as "Nom Fiscal", "_"."Nombre Comercial" as "Nom du Tiers", "_"."Prospecto" as "Prospect", "_"."Proveedor" as "Fournisseur", "_"."Cliente" as "Client", "_"."Empleado" as "Employé", "_"."NIF" as "TAX", "_"."m_pricelist_id" as "m_pricelist_id", "_"."po_pricelist_id" as "po_pricelist_id", "_"."salesrep_id" as "salesrep_id", "_"."location" as "location", "_"."contact" as "contact", "_"."birthday" as "birthday", "_"."created" as "created", "_"."is_customer_consent" as "is_customer_consent", "_"."birthday_partner" as "birthday_partner" from ( SELECT c_bpartner_id , value as "Identificador" , name as "Nombre Fiscal" , name2 as "Nombre Comercial" , isprospect as "Prospecto" , isvendor as "Proveedor" , iscustomer as "Cliente" , isemployee as "Empleado" , taxid as "NIF" , m_pricelist_id , po_pricelist_id , salesrep_id , (select concat(cl.address1,$1, cl.city,$2, cl.postal,$3, cc.name) from c_bpartner_location cbl inner join c_location cl on cbl.c_location_id = cl.c_location_id left join c_country cc on cc.c_country_id = cl.c_country_id where cbl.c_bpartner_id = c_bpartner.c_bpartner_id limit $4) as location , (select concat(u.phone, $5, u.email, $6, u.commercialauth) from ad_user u where u.c_bpartner_id = c_bpartner.c_bpartner_id LIMIT $7) as contact -- ✅ AJOUTÉ , (select birthday from ad_user u where u.c_bpartner_id = c_bpartner.c_bpartner_id LIMIT $8) as birthday , created , is_customer_consent , birthday as birthday_partner FROM c_bpartner ) "_"
9c8be0ed8fSELECT * FROM (select bp.c_bpartner_id AS REFERENCEKEY_ID, $2 AS AD_ROLE_ID, $3 AS AD_USER_ID, $4 || AD_COLUMN_IDENTIFIER($5, bp.C_BPARTNER_ID, $6) || $7 AS DESCRIPTION, $8 AS ISACTIVE, bp.AD_ORG_ID AS AD_ORG_ID, bp.AD_CLIENT_ID AS AD_CLIENT_ID, now() AS CREATED, $9 AS CREATEDBY, now() AS UPDATED, $10 AS UPDATEDBY, AD_COLUMN_IDENTIFIER($11, bp.C_BPARTNER_ID, $12) AS RECORD_ID from c_bpartner bp where exists (select $13 from c_bpartner_location bpl inner join c_location l on (bpl.c_location_id = l.c_location_id) where bpl.c_bpartner_id = bp.c_bpartner_id and bpl.istaxlocation = $14 group by bpl.c_bpartner_id, bpl.istaxlocation having count(distinct(l.c_country_id)) > $15 )) AAA where not exists (select $16 from ad_alert a where a.ad_alertrule_id = $1 and a.referencekey_id = aaa.referencekey_id and coalesce(a.status, $17) != $18)
33f5216a17SELECT count(*) FROM DUAL WHERE EXISTS (SELECT $14 FROM m_costing WHERE datefrom <= p_movementdate AND dateto > p_movementdate AND m_product_id = p_product_id AND COALESCE(m_warehouse_id, p_warehouse_id, $15) = COALESCE(p_warehouse_id, m_warehouse_id, $16) AND ad_org_id IN (v_legal_entity,$17) AND cost IS NOT NULL AND costtype IN ($18, $19) AND costtype = COALESCE(v_CostType, costtype) )
3e80950586SELECT 1 FROM ONLY "public"."c_bpartner" x WHERE "c_bpartner_id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR KEY SHARE OF x
6b67fe6923insert into M_Transaction (AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, MovementType, M_Locator_ID, M_Product_ID, MovementDate, MovementQty, M_InOutLine_ID, M_AttributeSetInstance_ID, C_UOM_ID, TrxProcessDate, IsCostCalculated, Costing_Status, Checkreservedqty, Isprocessed, Checkpricedifference, EM_Prouti_Exported, Manualcostadjustment, IsCostPermanent, M_Transaction_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25)
fb45d4a61fselect orderline0_.M_Product_ID as col_0_0_, product1_.Name as col_1_0_, sum(orderline0_.QtyOrdered) as col_2_0_, uom3_.Name as col_3_0_, product1_.C_UOM_ID as col_4_0_ from C_OrderLine orderline0_ cross join M_Product product1_ cross join C_UOM uom3_ cross join C_Order order5_ cross join M_Product product7_ where orderline0_.M_Product_ID=product1_.M_Product_ID and product1_.C_UOM_ID=uom3_.C_UOM_ID and orderline0_.C_Order_ID=order5_.C_Order_ID and orderline0_.M_Product_ID=product7_.M_Product_ID and order5_.DocStatus=$61 and order5_.IsSOTrx=$62 and $63=$64 and orderline0_.AD_Client_ID=$1 and (product7_.Name like $2) and (orderline0_.AD_Org_ID in ($3 , $4 , $5 , $6 , $7 , $8 , $9 , $10 , $11 , $12 , $13 , $14 , $15 , $16 , $17 , $18 , $19 , $20 , $21 , $22 , $23 , $24 , $25 , $26 , $27 , $28 , $29 , $30 , $31 , $32 , $33 , $34 , $35 , $36 , $37 , $38 , $39 , $40 , $41 , $42 , $43 , $44 , $45 , $46 , $47 , $48 , $49 , $50 , $51 , $52 , $53 , $54 , $55 , $56 , $57 , $58 , $59)) group by product1_.Name , uom3_.Name , orderline0_.M_Product_ID , product1_.C_UOM_ID order by sum(orderline0_.QtyOrdered) desc limit $60
a874297fd2SELECT M_INOUT_POST(PInstance_ID, $2)
0a9b2d6035SELECT * FROM (SELECT DISTINCT iol.m_product_id as referencekey_id, $2 as ad_role_id, $3 as ad_user_id, $4 || p.name || $5 as description, $6 as isactive, iol.ad_org_id as ad_org_id, iol.ad_client_id as ad_client_id, now() as created, $7 as createdBy, now() as updated, $8 as updatedBy, p.name as RECORD_ID FROM m_inoutline iol JOIN m_inout io ON iol.m_inout_id = io.m_inout_id AND io.issotrx = $9 AND io.docstatus = $10 JOIN m_transaction t ON iol.m_inoutline_id = t.m_inoutline_id JOIN c_bpartner bp ON io.c_bpartner_id = bp.c_bpartner_id JOIN m_product p ON iol.m_product_id = p.m_product_id JOIN m_costing_rule cr ON ad_isorgincluded(io.ad_org_id, cr.ad_org_id, io.ad_client_id) >= $11 AND cr.datefrom <= t.trxprocessdate AND cr.dateto > t.trxprocessdate JOIN m_costing_algorithm ca ON cr.m_costing_algorithm_id = ca.m_costing_algorithm_id AND ca.classname = $12 WHERE NOT EXISTS (SELECT $13 FROM m_matchpo mp WHERE mp.m_inoutline_id = iol.m_inoutline_id AND mp.c_orderline_id IS NOT NULL) AND NOT EXISTS (SELECT $14 FROM m_costing c WHERE c.m_product_id = iol.m_product_id AND c.costtype IN ($15, $16) AND c.datefrom <= t.trxprocessdate AND c.dateto > t.trxprocessdate) AND NOT EXISTS (SELECT $17 FROM m_productprice pp JOIN m_pricelist_version ppv ON pp.m_pricelist_version_id = ppv.m_pricelist_version_id JOIN m_pricelist pl ON pl.m_pricelist_id = ppv.m_pricelist_id WHERE pp.m_product_id = iol.m_product_id AND (bp.po_pricelist_id = ppv.m_pricelist_id OR (bp.po_pricelist_id IS NULL AND pl.issopricelist = $18)) AND ppv.validfrom <= t.trxprocessdate) AND NOT EXISTS (SELECT $19 FROM c_orderline ol JOIN c_order o ON ol.c_order_id = o.c_order_id AND o.issotrx = $20 AND o.processed = $21 WHERE ol.m_product_id = iol.m_product_id AND o.c_bpartner_id = bp.c_bpartner_id AND ad_isorgincluded(o.ad_org_id, cr.ad_org_id, io.ad_client_id) >= $22)) AAA where not exists (select $23 from ad_alert a where a.ad_alertrule_id = $1 and a.referencekey_id = aaa.referencekey_id and coalesce(a.status, $24) != $25)
1eec949137SELECT $4 FROM ONLY "profile"."last_stat_tablespaces" x WHERE "server_id" OPERATOR(pg_catalog.=) $1 AND "sample_id" OPERATOR(pg_catalog.=) $2 AND "tablespaceid" OPERATOR(pg_catalog.=) $3 FOR KEY SHARE OF x
93a759b1daBEGIN
0b24cb5d2fCOPY public.obcfr_ticket (obcfr_ticket_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, documentno, obpos_applications_id, ticketdate, json, seqno, prevhash, hash, hashtime, export) TO stdout
29bf42b1abselect "_"."m_transaction_id" as "m_transaction_id", "_"."m_locator_id" as "m_locator_id", "_"."m_warehouse_id" as "m_warehouse_id", "_"."ad_client_id" as "ad_client_id", "_"."ad_org_id" as "ad_org_id", "_"."updated" as "updated", "_"."m_product_id" as "m_product_id", "_"."trxprocessdate" as "Date mvt", "_"."Type de mouvement" as "Type mvt", "_"."Quantité de mouvement" as "Qté mvt", "_"."€ Coût de transaction" as "€ Coût de transaction", "_"."€ Coût moyen du produit" as "€ Coût moyen du produit", "_"."Nom de l'inventaire" as "Nom de l'inventaire", "_"."Bon de livraison" as "Bon de livraison", "_"."Document Commande" as "Document Commande", "_"."TPV" as "TPV", "_"."Type de document" as "Type doc" from ( SELECT mt.m_transaction_id , mt.m_locator_id , ml.m_warehouse_id , mt.ad_client_id , mt.ad_org_id , mt.updated , mt.m_product_id , trunc(mt.trxprocessdate) as trxprocessdate , mt.movementtype as "Type de mouvement" , mt.movementqty as "Quantité de mouvement" , mt.transactioncost as "€ Coût de transaction" , m_get_cost(mt.m_product_id, mt.trxprocessdate, $1, mt.ad_org_id, mt.ad_client_id, $2, $3, $4) AS "€ Coût moyen du produit" , coalesce(mi2."name", $5) as "Nom de l'inventaire" , coalesce(mi4."documentno", $6) as "Bon de livraison" , coalesce(o."documentno", $7) as "Document Commande" , coalesce(oa."name", $8) as "TPV" , coalesce(cd."name", $9) as "Type de document" FROM m_transaction mt LEFT JOIN m_locator ml on ml.m_locator_id = mt.m_locator_id left join m_inventoryline mi on mi.m_inventoryline_id = mt.m_inventoryline_id left join m_inventory mi2 on mi2.m_inventory_id = mi.m_inventory_id left join m_inoutline mi3 on mi3.m_inoutline_id = mt.m_inoutline_id left join m_inout mi4 on mi4.m_inout_id = mi3.m_inout_id left join c_orderline ol on ol.c_orderline_id = mi3.c_orderline_id left join c_order o on o.c_order_id = ol.c_order_id left join obpos_applications oa on o.em_obpos_applications_id = oa.obpos_applications_id left join c_doctype cd on cd.c_doctype_id = o.c_doctype_id WHERE mt.isactive = $10 ) "_"
f0238ffe1bCOPY public.obcfr_ticketreprint (obcfr_ticketreprint_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, obcfr_ticket_id, documentno, obpos_applications_id, terminal, printdate, json, seqno, prevhash, hash, hashtime, export) TO stdout
24f0f61153insert into M_InOut (AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, IsSOTrx, DocumentNo, DocAction, DocStatus, Processing, Processed, C_DocType_ID, Description, C_Order_ID, DateOrdered, IsPrinted, MovementType, MovementDate, DateAcct, C_BPartner_ID, C_BPartner_Location_ID, M_Warehouse_ID, DeliveryRule, FreightCostRule, FreightAmt, DeliveryViaRule, ChargeAmt, PriorityRule, CreateFrom, GenerateTo, AD_User_ID, SalesRep_ID, AD_OrgTrx_ID, UpdateLines, Calculate_Freight, RM_Receipt_PickEdit, RM_Shipment_Pickedit, Process_Goods_Java, Isnettingshipment, Iscompletelyinvoiced, EM_Obwpack_Packing, Invoicefromshipment, EM_Obwpack_Processed, EM_Obwpack_Reactivated, EM_Obwpack_Packingrequired, EM_OBEUCI_Ship, EM_Prouti_Changebpartner, EM_Pruti_Createfrom, EM_Izi_Exported, M_InOut_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52)
9149f0fdfaSELECT row_to_json(f) FROM ( SELECT prod.m_product_id as id, ad_column_identifier_std($7, prod.m_product_id) as identifier, CASE WHEN prod.isgeneric = $8 THEN $9 ELSE $10 END as "isGeneric", concat(prod.value, $11, prod.name) as name, $12 as show, cast(retstk_basic_json($13, prod.m_brand_id) as json) as brand, cast(retstk_basic_json($14, prod.m_product_category_id) as json) as "productCategory", (CASE WHEN prod.isgeneric = $15 AND (SELECT count($16) FROM m_product_ch pch LEFT JOIN m_characteristic ch ON ch.m_characteristic_id = pch.m_characteristic_id WHERE pch.m_product_id = p_product_id AND ch.em_retstk_horizontal_axis = $17 AND EXISTS (SELECT $18 FROM m_product bprod WHERE bprod.generic_product_id = prod.m_product_id) ) > $19 THEN ( SELECT array_to_json(array_agg(row_to_json(d))) FROM ( SELECT chv.m_ch_value_id as id, chv.name as identifier, chv.skcode as label_skcode, chv.name as label_name, cast(retstk_basic_json($20, chv.m_characteristic_id) as json) as characteristic FROM m_product_ch_value pchv LEFT JOIN m_ch_value chv ON chv.m_ch_value_id = pchv.m_ch_value_id LEFT JOIN m_characteristic ch ON ch.m_characteristic_id = chv.m_characteristic_id WHERE pchv.m_product_id IN (SELECT m_product_id FROM m_product WHERE generic_product_id = p_product_id) AND ch.em_retstk_horizontal_axis = $21 GROUP BY chv.m_ch_value_id ORDER BY coalesce(chv.em_retstk_seqno, $22) asc, chv.name asc ) d ) ELSE ( SELECT array_to_json(array_agg(row_to_json(d))) FROM (SELECT $23 as id, $24 as label_skcode, $25 as label_name FROM dual) d ) END) as "horizontalValues", (CASE WHEN prod.isgeneric = $26 AND (SELECT count($27) FROM m_product_ch pch LEFT JOIN m_characteristic ch ON ch.m_characteristic_id = pch.m_characteristic_id WHERE pch.m_product_id = prod.m_product_id AND ch.em_retstk_horizontal_axis != $28 AND CASE WHEN v_hideVariantCh = $29 THEN pch.isvariant = $30 ELSE $31=$32 END) > $33 THEN ( SELECT array_to_json(array_agg(row_to_json(vv))) FROM ( SELECT v.id as id, p_product_id as "genericId", v.description as description, (SELECT array_to_json(array_agg(row_to_json(d))) FROM ( SELECT m_ch_value_id as id, name as identifier, skcode as label_skcode, name as label_name, cast(retstk_basic_json($34, m_characteristic_id) as json) as characteristic FROM m_ch_value WHERE m_ch_value_id = ANY (string_to_array(variantcombinations,$35)) ORDER BY m_ch_value_id ) d) as values, (SELECT array_to_json(array_agg(row_to_json(s))) FROM ( SELECT ( SELECT row_to_json(f) FROM (SELECT m_warehouse.m_warehouse_id as id, m_warehouse.name as identifier, coalesce(m_warehouse.em_retstk_htmlcolor, $36) as "htmlColor", $37 as "show" FROM m_warehouse WHERE m_warehouse.m_warehouse_id = stk.m_warehouse_id ) as f) as warehouse, stk.stock FROM ( SELECT r.m_warehouse_id, array_to_json(array_agg(row_to_json(r))) as stock FROM ( SELECT wh.m_warehouse_id, CASE WHEN (SELECT count($38) FROM m_product_ch pch LEFT JOIN m_characteristic ch ON ch.m_characteristic_id = pch.m_characteristic_id WHERE pch.m_product_id = p_product_id AND ch.em_retstk_horizontal_axis = $39 ) > $40 THEN pchv.m_ch_value_id ELSE $41 END as size, sum(qtyonhand) as qtyonhand, sum(preqtyonhand) as preqtyonhand, coalesce((SELECT sum(ol.qtyordered - ol.qtydelivered) FROM c_orderline ol LEFT JOIN c_order o ON o.c_order_id = ol.c_order_id WHERE o.issotrx = $42 AND o.docstatus = $43 AND o.m_warehouse_id = wh.m_warehouse_id AND ol.m_product_id = p_product_id),$44)+ sum((case when mi.available = $45 then qtyonhand else $46 end)) as qtypending FROM m_storage_detail sd LEFT JOIN m_locator bin ON bin.m_locator_id = sd.m_locator_id LEFT JOIN m_inventorystatus mi ON mi.m_inventorystatus_id=bin.m_inventorystatus_id LEFT JOIN m_warehouse wh ON wh.m_warehouse_id = bin.m_warehouse_id LEFT JOIN m_product p ON p.m_product_id = sd.m_product_id LEFT JOIN m_product_ch_value pchv ON p.m_product_id = pchv.m_product_id LEFT JOIN m_characteristic ch ON ch.m_characteristic_id = pchv.m_characteristic_id WHERE wh.em_retstk_breakbylocator=$47 AND EXISTS (SELECT $48 FROM m_product WHERE m_product_id = sd.m_product_id AND generic_product_id = p_product_id) AND (SELECT count($49) FROM m_product_ch_value WHERE m_product_id = sd.m_product_id AND m_ch_value_id = ANY (string_to_array(variantcombinations,$50))) = array_length(string_to_array(variantcombinations,$51), $52) AND CASE WHEN (SELECT count($53) FROM m_product_ch pch LEFT JOIN m_characteristic ch ON ch.m_characteristic_id = pch.m_characteristic_id WHERE pch.m_product_id = p_product_id AND ch.em_retstk_horizontal_axis = $54 ) > $55 THEN ch.em_retstk_horizontal_axis = $56 ELSE $57 = $58 END AND wh.m_warehouse_id IN ( SELECT wh.m_warehouse_id FROM m_warehouse wh WHERE CASE WHEN coalesce((SELECT em_retstk_org_filters FROM ad_org WHERE ad_org_id = p_org_id), $59) = $60 THEN EXISTS (SELECT $61 FROM retstk_org_warehouse WHERE m_warehouse_id = wh.m_warehouse_id AND ad_org_id = p_org_id) ELSE NOT EXISTS (SELECT $62 FROM retstk_org_warehouse WHERE m_warehouse_id = wh.m_warehouse_id AND ad_org_id = p_org_id) AND ad_client_id = p_client_id END ) GROUP BY wh.m_warehouse_id, pchv.m_ch_value_id) as r GROUP BY r.m_warehouse_id ) as stk ) as s) as stock, ( SELECT array_to_json(array_agg(row_to_json(var))) FROM ( SELECT p.m_product_id as productid, $63 as productimg FROM m_product p WHERE p.generic_product_id = p_product_id ) as var ) as variantsproducts FROM ( SELECT replace(variantcombinations,$64,$65) as id, variantcombinations, (SELECT string_agg(m_ch_value.name, $66 ORDER BY m_characteristic.name ASC) FROM m_ch_value JOIN m_characteristic ON m_characteristic.m_characteristic_id=m_ch_value.m_characteristic_id WHERE m_ch_value_id = ANY (string_to_array(variantcombinations,$67))) as description FROM (SELECT p.m_product_id, string_agg(chval.m_ch_value_id, $68 ORDER BY chval.m_ch_value_id) AS variantcombinations FROM m_product_ch_value chval LEFT JOIN m_product p ON chval.m_product_id = p.m_product_id LEFT JOIN m_product_ch pch ON chval.m_product_id = pch.m_product_id AND pch.m_characteristic_id = chval.m_characteristic_id WHERE p.generic_product_id = p_product_id AND p.isactive = $69 AND chval.m_characteristic_id NOT IN (SELECT m_characteristic_id FROM m_characteristic WHERE em_retstk_horizontal_axis = $70) AND CASE WHEN v_hideVariantCh = $71 THEN pch.isvariant = $72 ELSE $73=$74 END GROUP BY p.m_product_id ) AS principal GROUP BY variantcombinations ) as v ) As vv ) WHEN prod.isgeneric = $75 THEN (SELECT array_to_json(array_agg(row_to_json(vv))) FROM ( SELECT v.id as id, p_product_id as "genericId", v.description as description, (SELECT array_to_json(array_agg(row_to_json(d))) FROM ( SELECT m_ch_value_id as id, name as identifier, skcode as label_skcode, name as label_name, cast(retstk_basic_json($76, m_characteristic_id) as json) as characteristic FROM m_ch_value WHERE m_ch_value_id = ANY (string_to_array(variantcombinations,$77)) ORDER BY m_ch_value_id ) d) as values, (SELECT array_to_json(array_agg(row_to_json(s))) FROM ( SELECT ( SELECT row_to_json(f) FROM (SELECT m_warehouse.m_warehouse_id as id, m_warehouse.name as identifier, coalesce(m_warehouse.em_retstk_htmlcolor, $78) as "htmlColor", $79 as "show" FROM m_warehouse WHERE m_warehouse.m_warehouse_id = stk.m_warehouse_id ) as f) as warehouse, stk.stock FROM ( SELECT r.m_warehouse_id, array_to_json(array_agg(row_to_json(r))) as stock FROM ( SELECT wh.m_warehouse_id, CASE WHEN (SELECT count($80) FROM m_product_ch pch LEFT JOIN m_characteristic ch ON ch.m_characteristic_id = pch.m_characteristic_id WHERE pch.m_product_id = p_product_id AND ch.em_retstk_horizontal_axis = $81 ) > $82 THEN pchv.m_ch_value_id ELSE $83 END as size, sum(qtyonhand) as qtyonhand, sum(preqtyonhand) as preqtyonhand, greatest(coalesce((SELECT sum(ol.qtyordered - ol.qtydelivered) FROM c_orderline ol LEFT JOIN c_order o ON o.c_order_id = ol.c_order_id WHERE o.issotrx = $84 AND o.docstatus = $85 AND o.m_warehouse_id = wh.m_warehouse_id AND ol.m_product_id = ANY (string_to_array(string_agg(sd.m_product_id, $86), $87))),$88),$89)+ sum((case when mi.available = $90 then qtyonhand else $91 end)) as qtypending FROM m_storage_detail sd LEFT JOIN m_locator bin ON bin.m_locator_id = sd.m_locator_id LEFT JOIN m_inventorystatus mi ON mi.m_inventorystatus_id=bin.m_inventorystatus_id LEFT JOIN m_warehouse wh ON wh.m_warehouse_id = bin.m_warehouse_id LEFT JOIN m_product p ON p.m_product_id = sd.m_product_id LEFT JOIN m_product_ch_value pchv ON p.m_product_id = pchv.m_product_id LEFT JOIN m_characteristic ch ON ch.m_characteristic_id = pchv.m_characteristic_id WHERE wh.em_retstk_breakbylocator=$92 AND EXISTS (SELECT $93 FROM m_product WHERE m_product_id = sd.m_product_id AND generic_product_id = p_product_id) --AND (SELECT count(1) FROM m_product_ch_value WHERE m_product_id = sd.m_product_id AND m_ch_value_id = ANY (string_to_array(variantcombinations,'/'))) = array_length(string_to_array(variantcombinations,'/'), 1) AND CASE WHEN (SELECT count($94) FROM m_product_ch pch LEFT JOIN m_characteristic ch ON ch.m_characteristic_id = pch.m_characteristic_id WHERE pch.m_product_id = p_product_id AND ch.em_retstk_horizontal_axis = $95 ) > $96 THEN ch.em_retstk_horizontal_axis = $97 ELSE $98 = $99 END AND wh.m_warehouse_id IN ( SELECT wh.m_warehouse_id FROM m_warehouse wh WHERE CASE WHEN coalesce((SELECT em_retstk_org_filters FROM ad_org WHERE ad_org_id = p_org_id), $100) = $101 THEN EXISTS (SELECT $102 FROM retstk_org_warehouse WHERE m_warehouse_id = wh.m_warehouse_id AND ad_org_id = p_org_id) ELSE NOT EXISTS (SELECT $103 FROM retstk_org_warehouse WHERE m_warehouse_id = wh.m_warehouse_id AND ad_org_id = p_org_id) AND ad_client_id = p_client_id END ) GROUP BY wh.m_warehouse_id, pchv.m_ch_value_id) as r GROUP BY r.m_warehouse_id ) as stk ) as s) as stock, ( SELECT array_to_json(array_agg(row_to_json(var))) FROM ( SELECT p.m_product_id as productid, $104 as productimg FROM m_product p WHERE p.generic_product_id = p_product_id ) as var ) as variantsproducts FROM ( SELECT replace(variantcombinations,$105,$106) as id, variantcombinations, $107 as description FROM (SELECT p.generic_product_id, string_agg(chval.m_ch_value_id, $108 ORDER BY chval.m_ch_value_id) AS variantcombinations FROM m_product_ch_value chval LEFT JOIN m_product p ON chval.m_product_id = p.m_product_id LEFT JOIN m_product_ch pch ON chval.m_product_id = pch.m_product_id AND pch.m_characteristic_id = chval.m_characteristic_id WHERE p.generic_product_id = p_product_id AND p.isactive = $109 AND CASE WHEN v_hideVariantCh = $110 THEN pch.isvariant = $111 ELSE $112=$113 END --AND chval.m_characteristic_id NOT IN (SELECT m_characteristic_id FROM m_characteristic WHERE em_retstk_horizontal_axis = 'Y') GROUP BY p.generic_product_id ) AS principal GROUP BY variantcombinations ) as v ) As vv) ELSE (SELECT array_to_json(array_agg(row_to_json(s))) FROM ( SELECT ( SELECT row_to_json(f) FROM (SELECT m_warehouse.m_warehouse_id as id, m_warehouse.name as identifier, coalesce(m_warehouse.em_retstk_htmlcolor, $114) as "htmlColor", $115 as "show" FROM m_warehouse WHERE m_warehouse.m_warehouse_id = stk.m_warehouse_id ) as f) as warehouse, stk.stock FROM ( SELECT r.m_warehouse_id, array_to_json(array_agg(row_to_json(r))) as stock FROM ( SELECT wh.m_warehouse_id, $116 as "isStandardProduct", ( SELECT row_to_json(var) FROM ( SELECT p.m_product_id as productid, $117 as productimg FROM m_product p WHERE p.m_product_id = p_product_id ) as var ) as product, ( SELECT row_to_json(f) FROM (SELECT m_warehouse.m_warehouse_id as id, m_warehouse.name as identifier, coalesce(m_warehouse.em_retstk_htmlcolor, $118) as "htmlColor", $119 as "show" FROM m_warehouse WHERE m_warehouse.m_warehouse_id = wh.m_warehouse_id ) as f) as warehouse, sum(qtyonhand) as qtyonhand, sum(preqtyonhand) as preqtyonhand, coalesce((SELECT sum(ol.qtyordered - ol.qtydelivered) FROM c_orderline ol LEFT JOIN c_order o ON o.c_order_id = ol.c_order_id WHERE o.issotrx = $120 AND o.docstatus = $121 AND o.m_warehouse_id = wh.m_warehouse_id AND ol.m_product_id = p_product_id),$122)+ sum((case when mi.available = $123 then qtyonhand else $124 end)) as qtypending FROM m_storage_detail sd LEFT JOIN m_locator bin ON bin.m_locator_id = sd.m_locator_id LEFT JOIN m_inventorystatus mi ON mi.m_inventorystatus_id=bin.m_inventorystatus_id LEFT JOIN m_warehouse wh ON wh.m_warehouse_id = bin.m_warehouse_id LEFT JOIN m_product p ON p.m_product_id = sd.m_product_id WHERE wh.em_retstk_breakbylocator=$125 AND (sd.m_product_id = p_product_id OR sd.m_product_id IN (SELECT m_product_id FROM m_product WHERE generic_product_id = p_product_id)) AND wh.m_warehouse_id IN ( SELECT wh.m_warehouse_id FROM m_warehouse wh WHERE CASE WHEN coalesce((SELECT em_retstk_org_filters FROM ad_org WHERE ad_org_id = p_org_id), $126) = $127 THEN EXISTS (SELECT $128 FROM retstk_org_warehouse WHERE m_warehouse_id = wh.m_warehouse_id AND ad_org_id = p_org_id) ELSE NOT EXISTS (SELECT $129 FROM retstk_org_warehouse WHERE m_warehouse_id = wh.m_warehouse_id AND ad_org_id = p_org_id) AND ad_client_id = p_client_id END ) GROUP BY wh.m_warehouse_id) as r GROUP BY r.m_warehouse_id ) as stk ) as s) END) as "verticalValues" FROM m_product prod WHERE prod.m_product_id = p_product_id ) As f
27b400c7dbselect c_import_e0_.C_IMPORT_ENTRY_ID as c_import1_236_0_, c_import_e0_.AD_Client_ID as ad_clien2_236_0_, c_import_e0_.AD_Org_ID as ad_org_i3_236_0_, c_import_e0_.Isactive as isactive4_236_0_, c_import_e0_.Created as created5_236_0_, c_import_e0_.Createdby as createdb6_236_0_, c_import_e0_.Updated as updated7_236_0_, c_import_e0_.Updatedby as updatedb8_236_0_, c_import_e0_.Imported as imported9_236_0_, c_import_e0_.Jsoninfo as jsoninf10_236_0_, c_import_e0_.ImportStatus as imports11_236_0_, c_import_e0_.Typeofdata as typeofd12_236_0_, c_import_e0_.Errorinfo as errorin13_236_0_, c_import_e0_.AD_Role_ID as ad_role14_236_0_, c_import_e0_.Createdtimestamp as created15_236_0_, c_import_e0_.EM_Obpos_Applications_ID as em_obpo16_236_0_, c_import_e0_.Responseinfo as respons17_236_0_, c_import_e0_.Isnonblocking as isnonbl18_236_0_ from C_IMPORT_ENTRY c_import_e0_ where c_import_e0_.C_IMPORT_ENTRY_ID=$1
5f8e9d0065SELECT 1 FROM ONLY "public"."ad_client" x WHERE "ad_client_id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR KEY SHARE OF x
905bffc89cSELECT profile.take_sample()
313b1ecda9insert into C_IMPORT_ENTRY (AD_Client_ID, AD_Org_ID, Isactive, Created, Createdby, Updated, Updatedby, Jsoninfo, ImportStatus, Typeofdata, AD_Role_ID, Createdtimestamp, Isnonblocking, C_IMPORT_ENTRY_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14)
616a44c111insert into OBCFR_Ticket (AD_Client_ID, AD_Org_ID, Isactive, Created, Createdby, Updated, Updatedby, Obpos_Applications_ID, Ticketdate, Json, Seqno, Prevhash, Hash, Hashtime, Export, Documentno, Obcfr_Ticket_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17)
61aed5765cselect businesspa0_.C_BPartner_Location_ID as col_0_0_, businesspa1_.C_BPartner_ID as col_1_0_, coalesce(location2_.Address1, location2_.Postal, location2_.City, businesspa0_.Name) as col_2_0_, coalesce(location2_.Address2, $11) as col_3_0_, location2_.Postal as col_4_0_, location2_.City as col_5_0_, coalesce((select countrytrl4_.Name from C_Country_Trl countrytrl4_ where countrytrl4_.C_Country_ID=location2_.C_Country_ID and countrytrl4_.AD_Language=$12), country5_.Name) as col_6_0_, location2_.C_Country_ID as col_7_0_, businesspa0_.IsBillTo as col_8_0_, businesspa0_.IsShipTo as col_9_0_, businesspa0_.Isdefault_Shipto as col_10_0_, businesspa0_.Isdefault_Billto as col_11_0_, coalesce(region3_.Name, $13) as col_12_0_, coalesce(region3_.C_Region_ID, $14) as col_13_0_, businesspa0_.Created as col_14_0_, businesspa0_.Updated as col_15_0_, coalesce((location2_.Address1||case when location2_.Address2 is not null then $15 end||location2_.Address2), location2_.Address1, location2_.Address2, location2_.Postal, location2_.City) as col_16_0_, case when businesspa0_.IsActive=$16 and businesspa1_.IsActive=$17 then $18 else $19 end as col_17_0_, now() as col_18_0_ from C_BPartner_Location businesspa0_ inner join C_BPartner businesspa1_ on businesspa0_.C_BPartner_ID=businesspa1_.C_BPartner_ID left outer join C_Location location2_ on businesspa0_.C_Location_ID=location2_.C_Location_ID left outer join C_Region region3_ on location2_.C_Region_ID=region3_.C_Region_ID cross join C_Country country5_ where location2_.C_Country_ID=country5_.C_Country_ID and $20=$21 and businesspa1_.IsCustomer=$22 and (businesspa1_.M_PriceList_ID is not null) and (businesspa0_.Updated>$1 or businesspa1_.Updated>$2 or location2_.Updated>$3) and (businesspa0_.AD_Client_ID in ($23 , $24)) and (businesspa0_.AD_Org_ID in ($4 , $5 , $6 , $7 , $8 , $9)) and $25=$26 order by businesspa0_.C_BPartner_Location_ID limit $10
bf60147669SELECT COUNT(*) AS TOTAL FROM AD_SESSION WHERE AD_SESSION_ID = $1 AND SESSION_ACTIVE = $2 AND ISACTIVE = $3
3f546d3e2bselect "_"."c_orderline_id" as "c_orderline_id", "_"."c_order_id" as "c_order_id", "_"."ad_org_id" as "ad_org_id", "_"."isactive" as "Actif", "_"."issotrx" as "issotrx", "_"."c_bpartner_id" as "c_bpartner_id", "_"."c_currency_id" as "c_currency_id", "_"."m_product_id" as "m_product_id", "_"."m_warehouse_id" as "m_warehouse_id", "_"."m_product_category_id" as "m_product_category_id", "_"."line" as "line", cast("_"."Fecha Pedido" as date) as "Date Commande", cast("_"."Fecha Comprometida" as date) as "Date de livraison engagée", cast("_"."Fecha Enviada" as date) as "Fecha Enviada", "_"."Descripción" as "Description ligne", "_"."Cantidad Pedido" as "Qté vendue", "_"."Precio Lista" as "Prix List", "_"."Precio Actual" as "Prix Actuel", "_"."Precio Limite" as "Prix Limite", "_"."Importe Linea" as "Montant net ligne", "_"."Importe TTC" as "Importe TTC", "_"."Descuento" as "€ Remise", "_"."Cantidad Recibida" as "Quantite reçue", cast("_"."Fecha Recepción" as date) as "Fecha Recepción", cast("_"."bp_created" as date) as "bp_created", "_"."bp_country" as "bp_country", "_"."isdelivered" as "isdelivered" from ( SELECT OL.c_orderline_id , OL.c_order_id , (case when cd.isreturn = $1 then O.ad_orgtrx_id else OL.ad_org_id end) ad_org_id , OL.isactive , O.issotrx , OL.c_bpartner_id , OL.c_currency_id , OL.m_product_id , OL.m_warehouse_id , P.m_product_category_id , OL.line , OL.dateordered as "Fecha Pedido" , OL.datepromised as "Fecha Comprometida" , OL.datedelivered as "Fecha Enviada" , OL.description as "Descripción" , OL.qtyordered "Cantidad Pedido" , OL.pricelist "Precio Lista" , OL.priceactual "Precio Actual" , OL.pricelimit "Precio Limite" , OL.linenetamt "Importe Linea" , OL.line_gross_amount "Importe TTC" , OL.discount as "Descuento" , (SELECT SUM(movementqty) FROM m_inoutline IOL WHERE IOL.c_orderline_id = OL.c_orderline_id) as "Cantidad Recibida" , (SELECT MAX(movementdate) FROM m_inoutline IOL INNER JOIN m_inout IO on IO.m_inout_id = IOL.m_inout_id WHERE IOL.c_orderline_id = OL.c_orderline_id) as "Fecha Recepción" , BP.created as "bp_created" , (select cc.name from c_bpartner_location cbl inner join c_location cl on cbl.c_location_id = cl.c_location_id left join c_country cc on cc.c_country_id = cl.c_country_id where cbl.c_bpartner_id = BP.c_bpartner_id limit $2) as bp_country , O.isdelivered FROM c_orderline OL LEFT JOIN c_order O on O.c_order_id = OL.c_order_id left join c_doctype cd on O.c_doctype_id = cd.c_doctype_id LEFT JOIN m_product P on P.m_product_id = OL.m_product_id LEFT JOIN c_bpartner BP on BP.c_bpartner_id = O.c_bpartner_id WHERE $3=$4 AND O.issotrx = $5 AND OL.dateordered >= CURRENT_DATE - INTERVAL $6 ) "_"
017d00aa12insert into c_invoicelinetax (c_invoicelinetax_id, c_tax_id, c_invoice_id, c_invoiceline_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, taxbaseamt, taxamt, line, recalculate) select get_uuid(), olt.c_tax_id, i.c_invoice_id, il.c_invoiceline_id, i.ad_client_id, i.ad_org_id, $2, i.created, i.createdby, i.updated, i.updatedby, olt.taxbaseamt, olt.taxamt, olt.line, $4 from c_order o, c_orderline ol, c_orderlinetax olt, c_invoice i, c_invoiceline il where o.c_order_id = ol.c_order_id and ol.c_orderline_id = olt.c_orderline_id and ol.c_orderline_id = il.c_orderline_id and il.c_invoice_id = i.c_invoice_id and i.documentno = $1 and i.c_bpartner_id = o.c_bpartner_id and i.c_bpartner_location_id = coalesce(o.billto_id, o.c_bpartner_location_id) and coalesce(i.ad_user_id, $6) = coalesce(o.ad_user_id, $7)
225c51d0dbCOPY public.c_import_entry_archive (c_import_entry_archive_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, imported, jsoninfo, importstatus, typeofdata, errorinfo, ad_role_id, responseinfo, em_obpos_applications_id, isnonblocking) TO stdout
12a0f36339SELECT COALESCE(sum(month_total_amount),$1) AS month_total_amount, COALESCE(sum(week_total_amount),$2) AS week_total_amount, COALESCE(sum(day_total_amount),$3) AS day_total_amount, COALESCE(sum(month_total_units),$4) AS month_total_units, COALESCE(sum(week_total_units),$5) AS week_total_units, COALESCE(sum(day_total_units),$6) AS day_total_units, COALESCE(sum(month_total_amount_ret),$7) AS month_total_amount_ret, COALESCE(sum(week_total_amount_ret),$8) AS week_total_amount_ret, COALESCE(sum(day_total_amount_ret),$9) AS day_total_amount_ret, COALESCE(sum(month_total_units_ret),$10) AS month_total_units_ret, COALESCE(sum(week_total_units_ret),$11) AS week_total_units_ret, COALESCE(sum(day_total_units_ret),$12) AS day_total_units_ret FROM ( SELECT -- Pedidos CASE WHEN ol.line_gross_amount > $13 THEN ol.line_gross_amount END month_total_amount, CASE WHEN ol.line_gross_amount > $14 THEN ol.qtyordered END month_total_units, CASE WHEN o.created >= d.actual_week_date AND ol.line_gross_amount > $15 THEN ol.line_gross_amount END AS week_total_amount, CASE WHEN o.created >= d.actual_week_date AND ol.line_gross_amount > $16 THEN ol.qtyordered END AS week_total_units, CASE WHEN o.created >= d.actual_date AND ol.line_gross_amount > $17 THEN ol.line_gross_amount END AS day_total_amount, CASE WHEN o.created >= d.actual_date AND ol.line_gross_amount > $18 THEN ol.qtyordered END AS day_total_units, -- Devos CASE WHEN ol.line_gross_amount < $19 THEN ol.line_gross_amount END month_total_amount_ret, CASE WHEN ol.line_gross_amount < $20 THEN ol.qtyordered END month_total_units_ret, CASE WHEN o.created >= d.actual_week_date AND ol.line_gross_amount < $21 THEN ol.line_gross_amount END AS week_total_amount_ret, CASE WHEN o.created >= d.actual_week_date AND ol.line_gross_amount < $22 THEN ol.qtyordered END AS week_total_units_ret, CASE WHEN o.created >= d.actual_date AND ol.line_gross_amount < $23 THEN ol.line_gross_amount END AS day_total_amount_ret, CASE WHEN o.created >= d.actual_date AND ol.line_gross_amount < $24 THEN ol.qtyordered END AS day_total_units_ret FROM c_orderline ol LEFT JOIN c_order o ON ol.c_order_id = o.c_order_id LEFT JOIN c_doctype cd ON cd.c_doctype_id=o.c_doctypetarget_id , ( SELECT trunc(now()) actual_date, date_trunc($25,now()) actual_week_date, date_trunc($26,now()) actual_month_date FROM dual) d WHERE o.ad_org_id = $27 AND o.created >= d.actual_month_date AND cd.docsubtypeso<>$28 AND o.issotrx=$29 ) AS f1
3ca20ddb6cselect adlanguage0_.AD_Language_ID as ad_langu1_51_0_, adlanguage0_.AD_Language as ad_langu2_51_0_, adlanguage0_.AD_Client_ID as ad_clien3_51_0_, adlanguage0_.AD_Org_ID as ad_org_i4_51_0_, adlanguage0_.IsActive as isactive5_51_0_, adlanguage0_.Created as created6_51_0_, adlanguage0_.CreatedBy as createdb7_51_0_, adlanguage0_.Updated as updated8_51_0_, adlanguage0_.UpdatedBy as updatedb9_51_0_, adlanguage0_.Name as name10_51_0_, adlanguage0_.LanguageISO as languag11_51_0_, adlanguage0_.CountryCode as country12_51_0_, adlanguage0_.IsBaseLanguage as isbasel13_51_0_, adlanguage0_.IsSystemLanguage as issyste14_51_0_, adlanguage0_.Processing as process15_51_0_, adlanguage0_.Pixelsize as pixelsi16_51_0_, adlanguage0_.Translatedby as transla17_51_0_, adlanguage0_.Isrtl as isrtl18_51_0_ from AD_Language adlanguage0_ where adlanguage0_.AD_Language=$1
08db126a91select "_"."c_orderline_id" as "c_orderline_id", "_"."c_order_id" as "c_order_id", "_"."ad_org_id" as "ad_org_id", "_"."isactive" as "Actif", "_"."issotrx" as "issotrx", "_"."c_bpartner_id" as "c_bpartner_id", "_"."c_currency_id" as "c_currency_id", "_"."m_product_id" as "m_product_id", "_"."m_warehouse_id" as "m_warehouse_id", "_"."m_product_category_id" as "m_product_category_id", "_"."line" as "line", cast("_"."Fecha Pedido" as date) as "Date Commande", cast("_"."Fecha Comprometida" as date) as "Date de livraison engagée", cast("_"."Fecha Enviada" as date) as "Fecha Enviada", "_"."Descripción" as "Description ligne", "_"."Cantidad Pedido" as "Qté Commandée", "_"."Precio Lista" as "Prix List", "_"."Precio Actual" as "Prix Actuel", "_"."Precio Limite" as "Prix Limite", "_"."Importe Linea" as "Montant net ligne", "_"."Descuento" as "€ Remise", "_"."Cantidad Recibida" as "Quantite reçue", cast("_"."Fecha Recepción" as date) as "Fecha Recepción" from ( SELECT OL.c_orderline_id , OL.c_order_id , OL.ad_org_id , OL.isactive , O.issotrx , OL.c_bpartner_id , OL.c_currency_id , OL.m_product_id , OL.m_warehouse_id , P.m_product_category_id , OL.line , OL.dateordered as "Fecha Pedido" , OL.datepromised as "Fecha Comprometida" , OL.datedelivered as "Fecha Enviada" , OL.description as "Descripción" , OL.qtyordered "Cantidad Pedido" , OL.pricelist "Precio Lista" , OL.priceactual "Precio Actual" , OL.pricelimit "Precio Limite" , OL.linenetamt "Importe Linea" , OL.discount as "Descuento" , (SELECT SUM(movementqty) FROM m_inoutline IOL WHERE IOL.c_orderline_id = OL.c_orderline_id) as "Cantidad Recibida" , (SELECT MAX(movementdate) FROM m_inoutline IOL INNER JOIN m_inout IO on IO.m_inout_id = IOL.m_inout_id WHERE IOL.c_orderline_id = OL.c_orderline_id) as "Fecha Recepción" FROM c_orderline OL LEFT JOIN c_order O on O.c_order_id = OL.c_order_id LEFT JOIN m_product P on P.m_product_id = OL.m_product_id WHERE $1=$2 AND O.issotrx <> $3 AND OL.dateordered >= CURRENT_DATE - INTERVAL $4 ) "_"
8e8235137eSELECT 1 FROM ONLY "public"."ad_org" x WHERE "ad_org_id"::pg_catalog.text OPERATOR(pg_catalog.=) $1::pg_catalog.text FOR KEY SHARE OF x
528c231cbeUPDATE M_STORAGE_DETAIL SET QTYONHAND=QTYONHAND + COALESCE(p_qty, 0), QTYORDERONHAND=QTYORDERONHAND + v_qtyorder, DATELASTINVENTORY=COALESCE(p_datelastinventory, DATELASTINVENTORY), PREQTYONHAND=PREQTYONHAND + COALESCE(p_preqty, 0), PREQTYORDERONHAND=PREQTYORDERONHAND + v_preqtyorder, AD_CLIENT_ID=p_client, UPDATED=TO_DATE(NOW()), UPDATEDBY=p_user WHERE M_PRODUCT_ID=p_product AND M_LOCATOR_ID=p_locator AND M_ATTRIBUTESETINSTANCE_ID=v_attributesetinstance AND C_UOM_ID=p_uom AND COALESCE(M_PRODUCT_UOM_ID, '-1')=COALESCE(p_product_uom, '-1')
2d19e5b311insert into OBCFR_TicketReprint (AD_Client_ID, AD_Org_ID, Isactive, Created, Createdby, Updated, Updatedby, Obcfr_Ticket_ID, Obpos_Applications_ID, Printdate, Json, Prevhash, Hash, Hashtime, Documentno, Terminal, Seqno, Export, Obcfr_Ticketreprint_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19)
7e35c14916select distinct aduser0_.Name as col_0_0_, aduser0_.UserName as col_1_0_, aduser0_.AD_User_ID as col_2_0_, aduser0_.Firstname as col_3_0_, aduser0_.Lastname as col_4_0_ from AD_User aduser0_ cross join AD_User_Roles aduserrole1_ cross join AD_Role adrole2_ cross join AD_Form_Access adformacce3_ cross join OBPOS_APPLICATIONS obpos_appl4_ cross join AD_Role_OrgAccess adroleorga5_ where aduser0_.IsActive=$21 and (aduser0_.UserName is not null) and (aduser0_.Password is not null) and aduserrole1_.IsActive=$22 and adrole2_.IsActive=$23 and obpos_appl4_.Value=$1 and aduser0_.AD_User_ID=aduserrole1_.AD_User_ID and aduserrole1_.AD_Role_ID=adrole2_.AD_Role_ID and adrole2_.IsPortal=$24 and (adformacce3_.IsActive=$25 and adrole2_.AD_Role_ID=adformacce3_.AD_Role_ID and adformacce3_.AD_Form_ID=$2 or adrole2_.IsManual=$26) and (adroleorga5_.AD_Role_ID=adrole2_.AD_Role_ID and adroleorga5_.AD_Org_ID=obpos_appl4_.AD_Org_ID and adroleorga5_.IsActive=$27 or adrole2_.IsManual=$28 and not (exists (select adroleorga6_.AD_Role_OrgAccess_ID from AD_Role_OrgAccess adroleorga6_ where adroleorga6_.AD_Role_ID=adrole2_.AD_Role_ID and adroleorga6_.IsActive=$29 and (adroleorga6_.AD_Org_ID in ($3 , $4 , $5 , $6 , $7 , $8))))) and (aduser0_.AD_Org_ID in ($9 , $10 , $11 , $12 , $13 , $14) or obpos_appl4_.AD_Org_ID in ($15 , $16 , $17 , $18 , $19 , $20)) and ( not (exists (select obpos_term7_.Obpos_Userterminal_Access_ID from OBPOS_Userterminal_Access obpos_term7_ where obpos_term7_.AD_User_ID=aduser0_.AD_User_ID)) or exists (select obpos_term8_.Obpos_Userterminal_Access_ID from OBPOS_Userterminal_Access obpos_term8_ where obpos_term8_.AD_User_ID=aduser0_.AD_User_ID and obpos_term8_.Obpos_Applications_ID=obpos_appl4_.Obpos_Applications_ID)) order by aduser0_.Name
bb4767275dSELECT coalesce(ad_language,'en_US') FROM AD_CLIENT WHERE ad_client_id='0'
d1e21ddf3eSELECT REPLACE(REPLACE(SQL_RECORD_IDENTIFIER, ':c_language', '''' || p_Language || ''''), ':c_ID', p_Record_ID) FROM AD_TABLE WHERE UPPER(TABLENAME)=UPPER(p_TableName)
68de33d5d7INSERT INTO M_MATCHPO ( M_MatchPO_ID, AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, M_InOutLine_ID, C_OrderLine_ID, M_Product_ID, DateTrx, Qty, Processing, Processed, Posted ) VALUES ( v_MatchPO_ID, Cur_SLines.AD_Client_ID, Cur_SLines.AD_Org_ID, $260, TO_DATE(NOW()), v_User, TO_DATE(NOW()), v_User, Cur_SLines.M_InOutLine_ID, Cur_SLines.C_OrderLine_ID, Cur_SLines.M_Product_ID, TO_DATE(NOW()), v_Qty, $261, $262, $263 )
d3dcdac298SELECT AD_LEGALENTITY_ORG_ID FROM AD_Org WHERE AD_Org_ID = p_org_id
659ec453a2INSERT INTO M_TRANSACTION ( M_Transaction_ID, M_InOutLine_ID, AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, MovementType, M_Locator_ID, M_Product_ID, M_AttributeSetInstance_ID, MovementDate, MovementQty, M_Product_UOM_ID, QuantityOrder, C_UOM_ID ) VALUES ( v_NextNo, Cur_InOutLine.M_InOutLine_ID, Cur_InOutLine.AD_Client_ID, Cur_InOutLine.AD_Org_ID, $219, TO_DATE(NOW()), v_User, TO_DATE(NOW()), v_User, Cur_InOut.MovementType, Cur_InOutLine.M_Locator_ID, Cur_InOutLine.M_Product_ID, COALESCE(Cur_InOutLine.M_AttributeSetInstance_ID, $220), Cur_InOut.MovementDate, v_Qty, Cur_InOutLine.M_Product_UOM_ID, v_QuantityOrder, Cur_InOutLine.C_UOM_ID )
19825253efselect c_import_e0_.C_IMPORT_ENTRY_ID as c_import1_236_, c_import_e0_.AD_Client_ID as ad_clien2_236_, c_import_e0_.AD_Org_ID as ad_org_i3_236_, c_import_e0_.Isactive as isactive4_236_, c_import_e0_.Created as created5_236_, c_import_e0_.Createdby as createdb6_236_, c_import_e0_.Updated as updated7_236_, c_import_e0_.Updatedby as updatedb8_236_, c_import_e0_.Imported as imported9_236_, c_import_e0_.Jsoninfo as jsoninf10_236_, c_import_e0_.ImportStatus as imports11_236_, c_import_e0_.Typeofdata as typeofd12_236_, c_import_e0_.Errorinfo as errorin13_236_, c_import_e0_.AD_Role_ID as ad_role14_236_, c_import_e0_.Createdtimestamp as created15_236_, c_import_e0_.EM_Obpos_Applications_ID as em_obpo16_236_, c_import_e0_.Responseinfo as respons17_236_, c_import_e0_.Isnonblocking as isnonbl18_236_ from C_IMPORT_ENTRY c_import_e0_ where c_import_e0_.Typeofdata=$1 and c_import_e0_.ImportStatus='Initial' order by c_import_e0_.Created, c_import_e0_.Createdtimestamp limit $2
66bc870e45insert into FIN_Payment_ScheduleDetail (AD_Client_ID, AD_Org_ID, Created, Createdby, Updated, Updatedby, FIN_Payment_Schedule_Order, Amount, Isactive, Writeoffamt, Iscanceled, C_Bpartner_ID, DoubtfulDebt_Amount, Isinvoicepaid, FIN_Payment_Scheduledetail_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15)
4f9621bcb7insert into C_Order (AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, IsSOTrx, DocumentNo, DocStatus, DocAction, Processing, Processed, C_DocType_ID, C_DocTypeTarget_ID, Description, IsDelivered, IsInvoiced, IsPrinted, IsSelected, SalesRep_ID, DateOrdered, DatePromised, DateAcct, C_BPartner_ID, BillTo_ID, C_BPartner_Location_ID, IsDiscountPrinted, C_Currency_ID, PaymentRule, C_PaymentTerm_ID, InvoiceRule, DeliveryRule, FreightCostRule, DeliveryViaRule, ChargeAmt, PriorityRule, TotalLines, GrandTotal, M_Warehouse_ID, M_PriceList_ID, IsTaxIncluded, Posted, AD_User_ID, CopyFrom, IsSelfService, AD_OrgTrx_ID, Generatetemplate, CopyFromPO, FIN_Paymentmethod_ID, RM_PickFromShipment, RM_ReceiveMaterials, RM_CreateInvoice, RM_AddOrphanLine, Calculate_Promotions, Convertquotation, Create_POLines, EM_Obdisc_Addpack, Iscashvat, EM_OBMFM_Selectfreight, RM_Pickfromreceipt, Cancelandreplace, EM_APRM_AddPayment, Confirmcancelandreplace, EM_Obwpl_Generatepicking, EM_Obwpl_Isinpickinglist, EM_Fash_Sendbeforedate, EM_Obwpl_Readypl, EM_Poss_Businessdate, Iscancelled, EM_OBMFM_Set_Weight, EM_Obpos_Applications_ID, EM_Obpos_Sendemail, EM_Obpos_App_Cashup_ID, EM_Obpos_Createdabsolute, EM_OBPOS_NotInvoiceOnCashUp, EM_Obpos_Isdeleted, EM_Obpos_Islayaway, EM_Obpos_Prepaymentamt, EM_Obpos_Prepaymentlimitamt, EM_Obpos_Prepaymentlaylimitamt, EM_Obpos_Rounding_Amount, EM_Obpos_Sequencename, EM_Obpos_Sequencenumber, EM_Prpp_Generatepicking, EM_Api_Resend, EM_OBSMAIL_EmailAddress, EM_Prouti_Order_Stock, EM_Prouti_Pregenerate_Minout, EM_Prouti_Sotopo, EM_Prouti_Generate_Pick_Inv, EM_Prouti_Changebpartner, EM_Prouti_Recalculate_Price, EM_Prouti_Reactiveorder, EM_Izi_Exported, EM_Izijoy_Export_Enjoy, EM_Izi_Splio_Exported, em_prouti_Invoiced, em_prouti_Received, em_prouti_initial_received, EM_Prouti_Status_Of_Review, EM_Prouti_Validate_Order, EM_Prouti_Start_Review, EM_Obpos_Skip_Tax_Calculation, EM_Prouti_Addlines_Btn, EM_Avisver_Export, EM_Prouti_Select_Soline, EM_Prgr_Assign, C_Order_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100, $101, $102, $103, $104, $105, $106, $107, $108, $109)
8cb37f78eeinsert into C_OrderLine (AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, C_Order_ID, Line, C_BPartner_ID, DateOrdered, Description, M_Product_ID, M_Warehouse_ID, DirectShip, C_UOM_ID, QtyOrdered, QtyDelivered, C_Currency_ID, PriceList, PriceActual, LineNetAmt, Discount, ChargeAmt, C_Tax_ID, IsDescription, PriceStd, CANCELPRICEAD, Iseditlinenetamt, Gross_Unit_Price, Line_Gross_Amount, GrossPriceList, grosspricestd, Manage_Reservation, Manage_Prereservation, Explode, EM_OBMFM_IsFreightAmt, EM_Phieco_Deeenet, Print_Description, EM_Obwpl_Readypl, EM_Phieco_Deanet, EM_Phieco_Deeegross, Relate_Orderline, EM_Obrdm_Delivery_Mode, EM_Phieco_Deagross, em_fash_prodset_isvalidate, EM_Fash_Exclude_Productset, EM_Obpos_Isdeleted, EM_Obpos_Service_Proposed, EM_Prouti_Closeline, EM_Obpos_Canbedelivered, EM_Obpos_Ispaid, EM_Phieco_Pmcbnet, EM_Phieco_Pmcbgross, Salesrep_ID, EM_Izi_Splio_Exported, EM_Prouti_Recalculate_Qtyinit, C_OrderLine_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58)
3ff50f5232insert into C_OrderTax (C_Order_ID, C_Tax_ID, AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy, TaxBaseAmt, TaxAmt, Line, C_OrderTax_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)
018c5dd71eselect c_bpartner_id , trunc(created) as created , (select cc.name from c_bpartner_location cbl inner join c_location cl on cbl.c_location_id = cl.c_location_id left join c_country cc on cc.c_country_id = cl.c_country_id where cbl.c_bpartner_id = c_bpartner.c_bpartner_id limit $1) as bp_country from c_bpartner where $2=$3 and isactive = $4
48f140c821update c_orderline set qtyinvoiced=qtyordered where c_orderline_id in ( select ol.c_orderline_id from c_order o, c_orderline ol, c_orderlinetax olt, c_invoice i, c_invoiceline il where o.c_order_id = ol.c_order_id and ol.c_orderline_id = olt.c_orderline_id and ol.c_orderline_id = il.c_orderline_id and il.c_invoice_id = i.c_invoice_id and i.documentno = $1 and i.c_bpartner_id = o.c_bpartner_id and i.c_bpartner_location_id = coalesce(o.billto_id, o.c_bpartner_location_id) and coalesce(i.ad_user_id, $2) = coalesce(o.ad_user_id, $3))
8d633ecaabinsert into C_Import_Entry_Archive (AD_Client_ID, AD_Org_ID, Isactive, Created, Createdby, Updated, Updatedby, Imported, Jsoninfo, ImportStatus, Typeofdata, AD_Role_ID, Responseinfo, Isnonblocking, C_Import_Entry_Archive_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15)
70caf7bb1einsert into OBCFR_TicketTax (AD_Client_ID, AD_Org_ID, Isactive, Created, Createdby, Updated, Updatedby, Obcfr_Ticket_ID, Obpos_Applications_ID, Taxrate, Taxbase, Taxamt, Prevhash, Hash, Hashtime, Documentno, Terminal, Seqno, Export, Obcfr_Tickettax_ID) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20)
fe62dd3708INSERT INTO m_stock_proposed ( m_stock_proposed_id, ad_client_id, ad_org_id, isactive, created , createdby, updated, updatedby, ad_pinstance_id, priority, m_storage_detail_id, quantity, qtyorder, isfinal ) VALUES ( get_uuid(), v_ClientID, v_OrgID, 'Y', TO_DATE(NOW()), v_AD_User_ID, TO_DATE(NOW()), v_AD_User_ID, p_uuid, v_Count, Cur_Stock.M_STORAGE_DETAIL_ID, Cur_Stock.Qty, Cur_Stock.QtyOrder, 'Y' )
50e85a5d5eSELECT * FROM M_GET_STOCK_PARAM($1, $2, TO_NUMBER($3), $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, TO_NUMBER($17), $18, $19, $20, $21, $22, $23)

Schema object statistics

Top tables by estimated sequentially scanned volume

DBTablespaceSchemaTable~SeqBytesSeqScanIxScanIxFetInsUpdDelUpd(HOT)
openbravopg_defaultpublicc_bpartner126 GB764843958859474301399
c_bpartner(TOAST)
openbravopg_defaultpublicc_order99 GB108171139055778909210371644637
c_order(TOAST)
openbravopg_defaultpublicfin_payment15 GB2426063259179733002840
fin_payment(TOAST)
openbravopg_defaultpublicm_inout13 GB31519354807519441133987104729
m_inout(TOAST)111420544435291
openbravopg_defaultpublicc_orderline12 GB1054147347054855246765241476
c_orderline(TOAST)
openbravopg_defaultpublicfin_payment_schedule11 GB25575533160791491492148614185
fin_payment_schedule(TOAST)
openbravopg_defaultpublicm_transaction8657 MB142015734816633036
m_transaction(TOAST)
openbravopg_defaultpublicad_user8323 MB7656362067138859309361311
ad_user(TOAST)
openbravopg_defaultpublicad_table6485 MB912213311331
ad_table(TOAST)
openbravopg_defaultpg_catalogpg_class6043 MB6785806528843476
openbravopg_defaultprofilelast_stat_database4817 MB1233049292
openbravopg_defaultpublicm_inoutline4583 MB7225150725443905293910111001
m_inoutline(TOAST)
openbravopg_defaultpublicc_invoice3930 MB159875350071613671
c_invoice(TOAST)
openbravopg_defaultpublicc_location3053 MB451539342634765134235235
c_location(TOAST)
openbravopg_defaultpublicm_product2804 MB68131580564611150
m_product(TOAST)
openbravopg_defaultprofilelast_stat_tablespaces2049 MB437214646
last_stat_tablespaces(TOAST)
openbravopg_defaultpg_catalogpg_proc1945 MB100875710108304
pg_proc(TOAST)23356381
openbravopg_defaultpublicad_org1513 MB645728477736286044785638
ad_org(TOAST)3386933869
openbravopg_defaultpublicad_client758 MB48484692692
ad_client(TOAST)
openbravopg_defaultpublicc_orderlinetax618 MB1619256122467
c_orderlinetax(TOAST)

Top tables by blocks fetched

DBTablespaceSchemaTableHeapIxTOASTTOAST-Ix
Blks%TotalBlks%TotalBlks%TotalBlks%Total
openbravopg_defaultpublicm_inout52100524215.79156490422847.4269870.00381600.00
openbravopg_defaultpublicm_inoutline52691744115.97716607112.17
openbravopg_defaultpublicc_order599984731.82550444881.67
openbravopg_defaultpublicc_bpartner_location368132401.12525569841.59
openbravopg_defaultpublicc_location351565511.07463856581.41
openbravopg_defaultpublicad_org287570990.87284767480.86338690.001018770.00
openbravopg_defaultpublicc_orderline408250511.2429158780.09
openbravopg_defaultpublicm_costing278621000.84
openbravopg_defaultpublicc_country133402120.40133398380.40
openbravopg_defaultpublicad_user82168120.25169675650.51
openbravopg_defaultpublicfin_payment_schedule75158390.23173350900.53
openbravopg_defaultpublicfin_payment_detail150710040.461776310.01
openbravopg_defaultpublicm_matchpo25986420.0878331750.24
openbravopg_defaultpublicm_product38196610.1264950420.20
openbravopg_defaultpublicc_import_entry60388460.1813175060.041243740.003091440.01
openbravopg_defaultpublicc_bpartner47290920.1425513230.08
openbravopg_defaultpublicfin_payment_scheduledetail58009500.181842100.01
openbravopg_defaultprofilelast_stat_tables48989020.151353350.00
openbravopg_defaultpublicm_storage_detail28114830.0910770130.03
openbravopg_defaultpg_catalogpg_class15823220.0516335340.05

Top tables by blocks read

DBTablespaceSchemaTableHeapIxTOASTTOAST-IxHit(%)
Blks%TotalBlks%TotalBlks%TotalBlks%Total
openbravopg_defaultpublicobmobc_logclient33065.5644127.4299.37
openbravopg_defaultpublicc_import_entry_archive3140.531980.3334325.771200.2099.72
openbravopg_defaultpublicc_orderlinetax1220.2139246.6097.43
openbravopg_defaultpublicc_orderline5130.8634055.7299.99
openbravopg_defaultpublicc_invoiceline1230.2129584.9798.58
openbravopg_defaultpublicc_invoicelinetax770.1326714.4990.44
openbravopg_defaultpublicc_order3010.5123954.03100.00
openbravopg_defaultpublicm_transaction1670.2823213.9099.87
openbravopg_defaultpublicad_user270.0524184.0699.99
openbravopg_defaultpublicfin_payment_scheduledetail760.1323363.9399.96
openbravopg_defaultpublicm_inoutline2230.3721573.63100.00
openbravopg_defaultpublicobcfr_ticketreprint2450.4120833.5070.0192.63
openbravopg_defaultpublicobcfr_tickettax810.1419663.3093.82
openbravopg_defaultpublicm_inout1130.1914942.511070.18240.04100.00
openbravopg_defaultpublicobcfr_ticket2340.3914822.4940.0196.46
openbravopg_defaultpublicc_import_entry2740.4640.0114162.3840.0199.98
openbravopg_defaultpublicc_ordertax840.1413962.3598.06
openbravopg_defaultpublicfin_finacc_transaction1000.1711591.9599.60
openbravopg_defaultpublicm_matchpo510.0911631.9599.99
openbravopg_defaultpublicc_invoice1260.218141.3799.90

Top DML tables

DBTablespaceSchemaTableInsUpdDelUpd(HOT)SeqScanSeqFetIxScanIxFet
openbravopg_defaultprofilelast_stat_indexes672981607672982184107676841190405395
openbravopg_defaultprofilelast_stat_tables392384345392385918563122095674333716
openbravopg_defaultpublicc_import_entry9923992499231436474289712
c_import_entry(TOAST)15881158812512281205
openbravopg_defaultpublicobmobc_logclient56545
obmobc_logclient(TOAST)
openbravopg_defaultprofilelast_stat_user_functions90391018903954388268812
last_stat_user_functions(TOAST)
openbravopg_defaultpublicc_import_entry_archive426211421999886
c_import_entry_archive(TOAST)14577111098474914
openbravopg_defaultpg_catalogpg_statistic1285912385441892368412
pg_statistic(TOAST)175517534140888845
openbravopg_defaultpublicc_orderline246765241476101961928454147347054855
c_orderline(TOAST)
openbravopg_defaultprofilesample_stat_tables3966427616793826
openbravopg_defaultpublicm_storage_detail6254012162386346232999009514173
m_storage_detail(TOAST)
openbravopg_defaultpublicm_inoutline391011100171054328022515072544390529
m_inoutline(TOAST)
openbravopg_defaultpublicfin_payment973300284024171821432606325917
fin_payment(TOAST)
openbravopg_defaultpublicfin_payment_scheduledetail9732984939287115754434
fin_payment_scheduledetail(TOAST)
openbravopg_defaultpublicfin_finacc_transaction108320683466888974
fin_finacc_transaction(TOAST)
openbravopg_defaultpublicm_transaction30361413295965201573481663
m_transaction(TOAST)
openbravopg_defaultpublicfin_payment_schedule1492148614185253191671557553316079149
fin_payment_schedule(TOAST)
openbravopg_defaultpublicad_sequence298629333364362076207
ad_sequence(TOAST)
openbravopg_defaultpublicm_inout9871047293119559884519354807519441133
m_inout(TOAST)435291111420544
openbravopg_defaultprofilesample_stat_indexes1240146515439041
openbravopg_defaultpublicc_order10371644637108847714291711390557789092
c_order(TOAST)

Top tables by updated/deleted tuples

DBTablespaceSchemaTableUpdUpd(HOT)DelVacuumAutoVacuumAnalyzeAutoAnalyze
openbravopg_defaultprofilelast_stat_indexes1607267298354623
openbravopg_defaultprofilelast_stat_tables43455939238354623
openbravopg_defaultpublicc_import_entry99241992372120
c_import_entry(TOAST)1588148
openbravopg_defaultpg_catalogpg_statistic12859123851
pg_statistic(TOAST)17535
openbravopg_defaultprofilelast_stat_user_functions1018549039354623
last_stat_user_functions(TOAST)
openbravopg_defaultpublicc_orderline65241476
c_orderline(TOAST)
openbravopg_defaultpublicm_storage_detail540116232
m_storage_detail(TOAST)
openbravopg_defaultprofilesample_stat_tables427613
openbravopg_defaultpublicfin_payment3002840
fin_payment(TOAST)
openbravopg_defaultpublicad_sequence29862933126
ad_sequence(TOAST)
openbravopg_defaultpublicfin_payment_scheduledetail2984939
fin_payment_scheduledetail(TOAST)
openbravopg_defaultpublicobpos_applications243323311840
obpos_applications(TOAST)
openbravopg_defaultpublicfin_finacc_transaction2068
fin_finacc_transaction(TOAST)
openbravopg_defaultpublicm_storage_pending1662186
m_storage_pending(TOAST)
openbravopg_defaultpublicc_order1644637
c_order(TOAST)
openbravopg_defaultpublicfin_payment_schedule148618514
fin_payment_schedule(TOAST)
openbravopg_defaultprofilesample_stat_indexes146512
openbravopg_defaultpublicm_inout104729
m_inout(TOAST)291
openbravopg_defaultprofilesample_statements123312
sample_statements(TOAST)
openbravopg_defaultpublicobpos_app_cashup11941371
obpos_app_cashup(TOAST)

Top growing tables

DBTablespaceSchemaTableSizeGrowthInsUpdDelUpd(HOT)
openbravopg_defaultpublicad_process_run3536 kB128 kB268268
ad_process_run(TOAST)1136 kB48 kB19
openbravopg_defaultpublicobcfr_terminalmonitor80 MB72 kB69
openbravopg_defaultpublicad_treenode78 MB64 kB72
openbravopg_defaultpublicobpos_userterminal_access136 kB32 kB33
openbravopg_defaultprofilelast_stat_cluster40 kB32 kB2323
openbravopg_defaultprofilelast_stat_archiver48 kB32 kB2323
last_stat_archiver(TOAST)
openbravopg_defaultprofilelast_stat_user_functions264 kB24 kB90391018903954
last_stat_user_functions(TOAST)
openbravopg_defaultpg_catalogpg_statistic5032 kB8192 bytes1285912385
pg_statistic(TOAST)3792 kB17551753
openbravopg_defaultprofilesample_stat_tablespaces64 kB8192 bytes3032
openbravopg_defaultprofilesample_statements_total160 kB8192 bytes2730
sample_statements_total(TOAST)
openbravopg_defaultprofilesample_stat_user_func_total64 kB8192 bytes2832

Top indexes by blocks fetched

DBTablespaceSchemaTableIndexScansBlks%Total
openbravopg_defaultpublicm_inoutm_inout_key519350011156481622847.42
openbravopg_defaultpublicm_inoutlinem_inoutline_orderline21817496658508802.00
openbravopg_defaultpublicc_bpartner_locationc_bplocation_bpartner17372417522401941.58
openbravopg_defaultpublicc_orderc_order_key17101617516056491.56
openbravopg_defaultpublicc_locationc_location_key15393426463840341.41
openbravopg_defaultpublicad_orgad_org_key28475082284736820.86
openbravopg_defaultpublicm_costingm_costing_product_date27861164278613980.84
openbravopg_defaultpublicfin_payment_schedulefin_payment_schedule_key5743717172770840.52
openbravopg_defaultpublicad_userad_user_partner5484458164935120.50
openbravopg_defaultpublicc_countryc_country_key13333246133334050.40
openbravopg_defaultpublicm_matchpom_matchpo_inout259786278133240.24
openbravopg_defaultpublicm_productm_product_key315356763434800.19
openbravopg_defaultpublicm_inoutlinem_inoutline_product63529655490480.17
openbravopg_defaultpublicc_orderc_order_client_org_date_docno24531138990.09
openbravopg_defaultpublicc_bpartnerc_bpartner_key83101924962730.08
openbravopg_defaultpublicc_orderlineem_obpos_orderedqty44365319743890.06
openbravopg_defaultpg_catalogpg_attributepg_attribute_relid_attnum_index73749214910420.05
openbravopg_defaultpg_catalogpg_classpg_class_oid_index70671414257350.04
openbravopg_defaultpublicm_storage_detailm_storage_detail_un2617278143970.02
openbravopg_defaultpg_catalogpg_statisticpg_statistic_relid_att_inh_index3765537617100.02

Top indexes by blocks read

DBTablespaceSchemaTableIndexScansBlk Reads%TotalHits(%)
openbravopg_defaultpublicad_userad_user_name_id718063.0486.20
openbravopg_defaultpublicm_transactionm_transaction_key17242.9081.27
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_pk16502.7799.06
openbravopg_defaultpublicc_orderlinetaxc_orderlinetax_key15312.5784.62
openbravopg_defaultpublicc_orderlinetaxc_orderlinetax_orderline619215172.5595.64
openbravopg_defaultpublicm_inoutlinem_inoutline_key1570714342.4197.49
openbravopg_defaultpublicobmobc_logclientobmobc_logclient_context11982.0199.60
openbravopg_defaultpublicc_invoicelinec_invoiceline_inoutline220111711.9790.24
openbravopg_defaultpublicc_invoicelinetaxc_invoicelinetax_key10741.8179.90
openbravopg_defaultpublicc_invoicelinetaxc_invoicelinetax_invoiceline10701.8079.97
openbravopg_defaultpublicc_invoicelinec_invoiceline_key181610631.7990.15
openbravopg_defaultpublicc_orderlinec_orderline_order29121.5397.11
openbravopg_defaultpublicc_orderlinec_orderline_order9101.5397.10
openbravopg_defaultpublicc_orderlineem_obpos_deliveredqty9101.5397.13
openbravopg_defaultpublicfin_payment_scheduledetailfin_pay_scheduledetail_in16368391.4191.47
openbravopg_defaultpublicc_orderlinetaxc_orderlinetax_orderid8171.3791.27
openbravopg_defaultpublicobcfr_tickettaxobcfr_tickettax_term_hash7331.2380.80
openbravopg_defaultpublicobcfr_ticketreprintobcfr_ticketreprint_term_hash7181.2180.25
openbravopg_defaultpublicc_orderc_order_bpartner_dateordered8307101.1989.54
openbravopg_defaultpublicobcfr_ticketobcfr_ticket_term_hash6741.1380.33

Top growing indexes

DBTablespaceSchemaTableIndexIndexTable
SizeGrowthInsUpdDel
openbravopg_defaultpublicad_process_runad_process_run_ad_prequest_id824 kB32 kB193193
openbravopg_defaultprofilesample_statementspk_sample_statements_n624 kB24 kB717774
openbravopg_defaultprofilelast_stat_tablespk_last_stat_tables304 kB16 kB39238428639238
openbravopg_defaultprofilesample_stat_user_functionspk_sample_stat_user_functions336 kB16 kB327457
openbravopg_defaultpublicad_process_runad_process_run_key1200 kB16 kB174174
openbravopg_defaultpublicad_process_runad_process_run_status304 kB16 kB174174

Unused indexes

This table contains non-scanned indexes (during report period), ordered by number of DML operations on underlying tables. Constraint indexes are excluded.

DBTablespacesSchemaTableIndexIndexTable
SizeGrowthInsUpdDel
openbravopg_defaultpublicad_process_runad_process_run_ould_be_killed8192 bytes132132

User function statistics

Top functions by total time

DBSchemaFunctionExecutionsTime (s)
TotalSelfMeanMean self
openbravopublicm_get_cost139305822179.7975.000.0000.000
openbravopublicm_get_cost139305822104.78191.890.0000.000
openbravopublicm_get_no_trx_product_cost139305821342.8467.850.0000.000
openbravopublicm_get_no_trx_product_cost139305821275.00968.640.0000.000
openbravopublicm_get_product_cost13930582370.36370.360.0000.000
openbravopublicad_get_org_le_bu13728612306.43306.430.0000.000
openbravopublictrunc17402877178.71178.700.0000.000
openbravopublicretstk_product_stock_json284144.60142.620.5090.502
openbravopublicto_date13951100108.66108.660.0000.000
openbravopublicc_currency_convert_precision1393058291.2891.280.0000.000
openbravoprofiletake_sample2339.190.021.7040.001
openbravoprofiletake_sample_subset2339.170.081.7030.003
openbravoprofiletake_sample2339.092.431.7000.105
openbravopublicsubstract_days2850316436.7436.740.0000.000
openbravoprofiledblink62124.6324.630.0400.040
openbravopublicad_column_identifier1988114.8014.630.0010.001
openbravoprofilecollect_obj_stats2214.574.110.6620.187
openbravopublicad_column_identifier_std1853914.210.690.0010.000
openbravoprofilecollect_pg_stat_statements_stats2110.800.470.5150.023
openbravopublicm_get_stock_param16639.439.230.0060.006

Top functions by executions

DBSchemaFunctionExecutionsTime (s)
TotalSelfMeanMean self
openbravopublicsubstract_days2850316436.7436.740.0000.000
openbravopublictrunc17402877178.71178.700.0000.000
openbravopublicto_date13951100108.66108.660.0000.000
openbravopublicc_currency_convert_precision1393058291.2891.280.0000.000
openbravopublicm_get_cost139305822179.7975.000.0000.000
openbravopublicm_get_cost139305822104.78191.890.0000.000
openbravopublicm_get_no_trx_product_cost139305821342.8467.850.0000.000
openbravopublicm_get_no_trx_product_cost139305821275.00968.640.0000.000
openbravopublicm_get_product_cost13930582370.36370.360.0000.000
openbravopublicad_get_org_le_bu13728612306.43306.430.0000.000
openbravopublictrunc13553884.964.950.0000.000
openbravopublicto_number2371110.980.980.0000.000
openbravopublicto_char1996910.550.550.0000.000
openbravopublicad_istriggerenabled1812531.781.780.0000.000
openbravopublicad_isorgincluded1019912.252.250.0000.000
openbravopublicuuid_generate_v4313470.210.210.0000.000
openbravopublicad_column_identifier1988114.8014.630.0010.001
openbravopublicad_column_identifier_std1853914.210.690.0010.000
openbravopublicto_char168230.050.050.0000.000
openbravopublicobequals162270.130.130.0000.000

Top trigger functions by total time

DBSchemaFunctionExecutionsTime (s)
TotalSelfMeanMean self
openbravopublicintr_m_inoutline_trg36822.960.240.0010.000
openbravopublicc_orderline_trg289912.020.910.0000.000
openbravopublicm_inoutline_trg47131.660.700.0000.000
openbravopublicintr_c_orderline_trg89911.290.300.0000.000
openbravopublicc_orderline2_trg89911.201.080.0000.000
openbravopublicm_transaction_trg29711.080.480.0000.000
openbravopublicfash_orderline_check_status89911.030.970.0000.000
openbravopublicc_ordline_chk_restrictions_trg89910.690.630.0000.000
openbravopublicc_orderline_trg89910.530.450.0000.000
openbravopublicfash_copy_c_orderline89910.500.190.0000.000
openbravopublicfash_update_fshordline_trg89910.460.390.0000.000
openbravopublicc_bpartner_trg3850.390.380.0010.001
openbravopublicphieco_orderline_trg89910.390.330.0000.000
openbravopublicm_matchpo_trg11000.370.150.0000.000
openbravopublicaprm_fin_pmt_check_trg39200.340.270.0000.000
openbravopublicc_orderlinetax_trg12750.330.240.0000.000
openbravopublicm_ioline_chk_restrictions_trg41510.320.250.0000.000
openbravopublicaprm_fin_pmt_detail_check_trg19280.260.230.0000.000
openbravopublicm_storage_detail_trg49540.260.200.0000.000
openbravopublicfash_set_qtyinitial89910.250.190.0000.000

Vacuum-related statistics

Top tables by vacuum operations

DBTablespaceSchemaTableVacuum countAutovacuum countInsUpdDelUpd(HOT)
openbravopg_defaultpublicc_import_entry729923992499231
openbravopg_defaultprofilelast_stat_tables353923843453923859
openbravopg_defaultprofilelast_stat_indexes35672981607672982
openbravopg_defaultprofilelast_stat_user_functions3590391018903954
openbravopg_defaultpublicobpos_applications1824332331
openbravopg_defaultpublicad_ep_instance_para4181181
openbravopg_defaultprofilelast_stat_database29292
openbravopg_defaultpg_catalogpg_statistic11285912385
openbravopg_defaultpublicad_sequence129862933
openbravopg_defaultprofilelast_stat_cluster12323
openbravopg_defaultprofilelast_stat_archiver12323
openbravopg_defaultprofilesample_stat_tablespaces13032
openbravopg_defaultprofilelast_stat_tablespaces14646
openbravopg_defaultprofilesample_stat_tables139664276
openbravopg_defaultprofilesample_stat_indexes112401465
openbravopg_defaultprofilesample_statements110401233
openbravopg_defaultprofilesample_statements_total12730
openbravopg_defaultprofilesample_stat_user_functions1612755
openbravopg_defaultprofilesample_stat_user_func_total12832

Top tables by analyze operations

DBTablespaceSchemaTableAnalyze countAutoanalyze countInsUpdDelUpd(HOT)
openbravopg_defaultpublicc_import_entry1209923992499231
openbravopg_defaultprofilelast_stat_tables46233923843453923859
openbravopg_defaultprofilelast_stat_indexes4623672981607672982
openbravopg_defaultprofilelast_stat_user_functions462390391018903954
openbravopg_defaultpublicobpos_applications4024332331
openbravopg_defaultpublicad_sequence2629862933
openbravopg_defaultprofilelast_stat_tablespaces234646
openbravopg_defaultpublicfin_financial_account1010191013
openbravopg_defaultpublicad_process_request7287286
openbravopg_defaultpublicad_ep_instance_para6181181
openbravopg_defaultprofilelast_stat_database49292
openbravopg_defaultpublicad_session360522449
openbravopg_defaultprofilesample_stat_tables339664276
openbravopg_defaultprofilesample_stat_tables_total2104104
openbravopg_defaultprofilesample_stat_indexes212401465
openbravopg_defaultprofilesample_statements210401233
openbravopg_defaultprofilesample_statements_total22730
openbravopg_defaultprofilesample_stat_user_functions2612755
openbravopg_defaultpublicad_org15638
openbravopg_defaultpublicad_pinstance1142827

Top indexes by estimated vacuum load

DBTablespaceSchemaTableIndex~Vacuum bytesVacuum cntAutovacuum cntIX sizeRelsize
openbravopg_defaultprofilelast_stat_indexespk_last_stat_indexes17 MB35504 kB1936 kB
openbravopg_defaultpublicc_import_entryc_import_entry_key13 MB72184 kB1466 kB
openbravopg_defaultpublicc_import_entryc_import_entry_type_status_idx12 MB72170 kB1466 kB
openbravopg_defaultprofilelast_stat_tablespk_last_stat_tables10 MB35293 kB1476 kB
openbravopg_defaultpublicc_import_entryc_import_entry_idx9216 kB72128 kB1466 kB
openbravopg_defaultpublicc_import_entryem_obpos_application_fk9216 kB72128 kB1466 kB
openbravopg_defaultpublicc_import_entry(TOAST)pg_toast_53108_index4696 kB4899 kB2097 kB
openbravopg_defaultprofilesample_stat_tablespk_sample_stat_tables1360 kB11360 kB9816 kB
openbravopg_defaultprofilesample_statementsix_sample_stmts_qid1200 kB11200 kB3336 kB
openbravopg_defaultprofilesample_statementspk_sample_statements_n624 kB1624 kB3336 kB
openbravopg_defaultprofilesample_stat_indexespk_sample_stat_indexes528 kB1528 kB1904 kB
openbravopg_defaultpg_catalogpg_statistic(TOAST)pg_toast_2619_index464 kB593 kB3792 kB
openbravopg_defaultprofilesample_stat_user_functionspk_sample_stat_user_functions336 kB1336 kB696 kB
openbravopg_defaultpg_catalogpg_statisticpg_statistic_relid_att_inh_index288 kB1288 kB5032 kB
openbravopg_defaultpublicobpos_applicationsobpos_app_prefix288 kB1816 kB168 kB
openbravopg_defaultpublicobpos_applicationsobpos_terminal_key_id_un288 kB1816 kB168 kB
openbravopg_defaultpublicobpos_applicationsobpos_value_un288 kB1816 kB168 kB
openbravopg_defaultpublicobpos_applicationsobpos_app_pk288 kB1816 kB168 kB
openbravopg_defaultpublicobpos_applicationsobpos_app_tertype288 kB1816 kB168 kB
openbravopg_defaultpublicobpos_applicationsobpos_applications_name288 kB1816 kB168 kB

Top tables by dead tuples ratio

Data in this section is not differential. This data is valid for last report sample only.

DBSchemaTableLiveDead%DeadLast AVSize
openbravopg_catalogpg_attribute3505793022026-07-15 03:13:28.384746+025256 kB
openbravoprofilesample_stat_tables3115753912026-07-17 23:00:56.394842+029816 kB
openbravopublicad_treenode3409222078 MB

Top tables by modified tuples ratio

Table shows modified tuples statistics since last analyze.

Data in this section is not differential. This data is valid for last report sample only.

DBSchemaTableLiveDeadMod%ModLast AASize
openbravopg_catalogpg_attribute35057930187852026-07-15 03:13:28.612937+025256 kB
openbravopublicad_treenode340922292502025-11-13 15:11:37.162194+0178 MB
openbravopublicobcfr_terminalmonitor1909370548080 MB

Cluster settings during the report interval

Defined settings
Settingreset_valUnitSourceNotes
checkpoint_completion_target0.9/etc/postgresql/10/main/postgresql.conf:211
client_encodingUTF8
cluster_name10/main/etc/postgresql/10/main/postgresql.conf:477
config_file/etc/postgresql/10/main/postgresql.conf
data_checksumson
data_directory/var/lib/postgresql/10/main
DateStyleISO, DMY/etc/postgresql/10/main/postgresql.conf:566
default_text_search_configpg_catalog.spanish/etc/postgresql/10/main/postgresql.conf:588
effective_cache_size98304008kB/etc/postgresql/10/main/postgresql.conf:315
effective_io_concurrency200/etc/postgresql/10/main/postgresql.conf:164
external_pid_file/var/run/postgresql/10-main.pid/etc/postgresql/10/main/postgresql.conf:49
hba_file/etc/postgresql/10/main/pg_hba.conf
ident_file/etc/postgresql/10/main/pg_ident.conf
lc_collatees_ES.UTF-8
lc_ctypees_ES.UTF-8
lc_messagesen_US.UTF-8/etc/postgresql/10/main/conf.d/15-pgbadger.conf:11
lc_monetaryes_ES.UTF-8/etc/postgresql/10/main/postgresql.conf:583
lc_numericen_US.UTF-8/etc/postgresql/10/main/conf.d/01-openbravo-standard-postgres10.conf:38
lc_timees_ES.UTF-8/etc/postgresql/10/main/postgresql.conf:585
listen_addresses*/etc/postgresql/10/main/postgresql.conf:59
log_autovacuum_min_duration0ms/etc/postgresql/10/main/conf.d/15-pgbadger.conf:9
log_checkpointson/etc/postgresql/10/main/conf.d/01-openbravo-standard-postgres10.conf:26
log_connectionson/etc/postgresql/10/main/conf.d/15-pgbadger.conf:1
log_disconnectionson/etc/postgresql/10/main/conf.d/15-pgbadger.conf:2
log_line_prefix%t [%p]:[%l-1] db=%d,user=%u,app=%a,client=%h/etc/postgresql/10/main/conf.d/15-pgbadger.conf:4
log_lock_waitson/etc/postgresql/10/main/conf.d/15-pgbadger.conf:5
log_min_duration_statement1000ms/etc/postgresql/10/main/conf.d/15-pgbadger.conf:10
log_temp_files0kB/etc/postgresql/10/main/conf.d/15-pgbadger.conf:7
log_timezonelocaltime/etc/postgresql/10/main/conf.d/01-openbravo-standard-postgres10.conf:22
maintenance_work_mem2097152kB/etc/postgresql/10/main/postgresql.conf:123
max_connections200/etc/postgresql/10/main/postgresql.conf:64
max_locks_per_transaction128/etc/postgresql/10/main/conf.d/01-openbravo-standard-postgres10.conf:17
max_stack_depth2048kB
min_wal_size4096MB/etc/postgresql/10/main/postgresql.conf:210
pg_conf_load_time2026-07-15 03:00:05.218477+02
pg_postmaster_start_time2026-07-15 03:00:05.809034+02
pg_stat_statements.max10000/etc/postgresql/10/main/postgresql.conf:660
pg_stat_statements.trackall/etc/postgresql/10/main/postgresql.conf:661
random_page_cost1.1/etc/postgresql/10/main/postgresql.conf:307
server_encodingUTF8
shared_buffers32768008kB/etc/postgresql/10/main/postgresql.conf:113
shared_preload_libraries$libdir/pg_stat_statements/etc/postgresql/10/main/postgresql.conf:659
sslon/etc/postgresql/10/main/postgresql.conf:79
ssl_cert_file/etc/ssl/certs/ssl-cert-snakeoil.pem/etc/postgresql/10/main/postgresql.conf:84
ssl_key_file/etc/ssl/private/ssl-cert-snakeoil.key/etc/postgresql/10/main/postgresql.conf:85
stats_temp_directory/var/run/postgresql/10-main.pg_stat_tmp/etc/postgresql/10/main/postgresql.conf:493
TimeZonelocaltime/etc/postgresql/10/main/conf.d/01-openbravo-standard-postgres10.conf:23
timezone_abbreviationsDefault
track_functionsall/etc/postgresql/10/main/conf.d/15-pgbadger.conf:8
versionPostgreSQL 10.23 (Ubuntu 10.23-0ubuntu0.18.04.2) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, 64-bit
wal_buffers20488kB/etc/postgresql/10/main/postgresql.conf:198
work_mem32768kB/etc/postgresql/10/main/postgresql.conf:122
Default settings
Settingreset_valUnitSourceNotes
allow_in_place_tablespacesoff
allow_system_table_modsoff
application_name
archive_command
archive_modeoff
archive_timeout0s
array_nullson
authentication_timeout60s
autovacuumon
autovacuum_analyze_scale_factor0.1
autovacuum_analyze_threshold50
autovacuum_freeze_max_age200000000
autovacuum_max_workers3
autovacuum_multixact_freeze_max_age400000000
autovacuum_naptime60s
autovacuum_vacuum_cost_delay20ms
autovacuum_vacuum_cost_limit-1
autovacuum_vacuum_scale_factor0.2
autovacuum_vacuum_threshold50
autovacuum_work_mem-1kB
backend_flush_after08kB
backslash_quotesafe_encoding
bgwriter_delay200ms
bgwriter_flush_after648kB
bgwriter_lru_maxpages100
bgwriter_lru_multiplier2
block_size8192
bonjouroff
bonjour_name
bytea_outputhex
check_function_bodieson
checkpoint_flush_after328kB
checkpoint_timeout300s
checkpoint_warning30s
client_min_messagesnotice
commit_delay0
commit_siblings5
constraint_exclusionpartition
cpu_index_tuple_cost0.005
cpu_operator_cost0.0025
cpu_tuple_cost0.01
cursor_tuple_fraction0.1
data_sync_retryoff
db_user_namespaceoff
deadlock_timeout1000ms
debug_assertionsoff
debug_pretty_printon
debug_print_parseoff
debug_print_planoff
debug_print_rewrittenoff
default_statistics_target100/etc/postgresql/10/main/postgresql.conf:329
default_tablespace
default_transaction_deferrableoff
default_transaction_isolationread committed
default_transaction_read_onlyoff
default_with_oidsoff
dynamic_library_path$libdir
dynamic_shared_memory_typeposix/etc/postgresql/10/main/postgresql.conf:127
enable_bitmapscanon
enable_gathermergeon
enable_hashaggon
enable_hashjoinon
enable_indexonlyscanon
enable_indexscanon
enable_materialon
enable_mergejoinon
enable_nestloopon
enable_seqscanon
enable_sorton
enable_tidscanon
escape_string_warningon
event_sourcePostgreSQL
exit_on_erroroff
extra_float_digits0
force_parallel_modeoff
from_collapse_limit8
fsyncon
full_page_writeson
geqoon
geqo_effort5
geqo_generations0
geqo_pool_size0
geqo_seed0
geqo_selection_bias2
geqo_threshold12
gin_fuzzy_search_limit0
gin_pending_list_limit4096kB
hot_standbyon
hot_standby_feedbackoff
huge_pagestry
idle_in_transaction_session_timeout0ms
ignore_checksum_failureoff
ignore_system_indexesoff
integer_datetimeson
IntervalStylepostgres
join_collapse_limit8
krb_caseins_usersoff
krb_server_keyfileFILE:/etc/postgresql-common/krb5.keytab
local_preload_libraries
lock_timeout0ms
lo_compat_privilegesoff
log_destinationstderr
log_directorylog
log_durationoff/etc/postgresql/10/main/conf.d/15-pgbadger.conf:3
log_error_verbositydefault
log_executor_statsoff
log_file_mode384
log_filenamepostgresql-%Y-%m-%d_%H%M%S.log
logging_collectoroff
log_hostnameoff
log_min_error_statementerror
log_min_messageswarning
log_parser_statsoff
log_planner_statsoff
log_replication_commandsoff
log_rotation_age1440min
log_rotation_size10240kB
log_statementnone/etc/postgresql/10/main/conf.d/15-pgbadger.conf:6
log_statement_statsoff
log_truncate_on_rotationoff
max_files_per_process1000
max_function_args100
max_identifier_length63
max_index_keys32
max_logical_replication_workers4
max_parallel_workers8
max_parallel_workers_per_gather2
max_pred_locks_per_page2
max_pred_locks_per_relation-2
max_pred_locks_per_transaction64
max_prepared_transactions0
max_replication_slots10
max_standby_archive_delay30000ms
max_standby_streaming_delay30000ms
max_sync_workers_per_subscription2
max_wal_senders10
max_wal_size1024MB/etc/postgresql/10/main/postgresql.conf:209
max_worker_processes8
min_parallel_index_scan_size648kB
min_parallel_table_scan_size10248kB
old_snapshot_threshold-1min
operator_precedence_warningoff
parallel_setup_cost1000
parallel_tuple_cost0.1
password_encryptionmd5
pg_profile.topn20
pg_stat_statements.saveon
pg_stat_statements.track_utilityon
port5432/etc/postgresql/10/main/postgresql.conf:63
post_auth_delay0s
pre_auth_delay0s
quote_all_identifiersoff
replacement_sort_tuples150000
restart_after_crashon
row_securityon
search_path"$user", public
segment_size1310728kB
seq_page_cost1
server_version10.23 (Ubuntu 10.23-0ubuntu0.18.04.2)
server_version_num100023
session_preload_libraries
session_replication_roleorigin
ssl_ca_file
ssl_ciphersHIGH:MEDIUM:+3DES:!aNULL
ssl_crl_file
ssl_dh_params_file
ssl_ecdh_curveprime256v1
ssl_prefer_server_cipherson
standard_conforming_stringson
statement_timeout0ms
superuser_reserved_connections3
synchronize_seqscanson
synchronous_commiton
synchronous_standby_names
syslog_facilitylocal0
syslog_identpostgres
syslog_sequence_numberson
syslog_split_messageson
system_identifier7083440090454890352
tcp_keepalives_count0
tcp_keepalives_idle0s
tcp_keepalives_interval0s
temp_buffers10248kB
temp_file_limit-1kB
temp_tablespaces
trace_notifyoff
trace_recovery_messageslog
trace_sortoff
track_activitieson
track_activity_query_size1024
track_commit_timestampoff
track_countson
track_io_timingoff
transaction_deferrableoff
transaction_isolationdefault
transaction_read_onlyoff
transform_null_equalsoff
unix_socket_directories/var/run/postgresql/etc/postgresql/10/main/postgresql.conf:66
unix_socket_group
unix_socket_permissions511
update_process_titleon
vacuum_cost_delay0ms
vacuum_cost_limit200
vacuum_cost_page_dirty20
vacuum_cost_page_hit1
vacuum_cost_page_miss10
vacuum_defer_cleanup_age0
vacuum_freeze_min_age50000000
vacuum_freeze_table_age150000000
vacuum_multixact_freeze_min_age5000000
vacuum_multixact_freeze_table_age150000000
wal_block_size8192
wal_compressionoff
wal_consistency_checking
wal_keep_segments0
wal_levelreplica
wal_log_hintsoff
wal_receiver_status_interval10s
wal_receiver_timeout60000ms
wal_retrieve_retry_interval5000ms
wal_segment_size20488kB
wal_sender_timeout60000ms
wal_sync_methodfdatasync
wal_writer_delay200ms
wal_writer_flush_after1288kB
xmlbinarybase64
xmloptioncontent
zero_damaged_pagesoff