-
Global information
- Generated on Thu Feb 22 00:50:10 2024
- Log file: /var/log/postgresql/postgresql-14-main.log
- Parsed 151,798 log entries in 8s
- Log start from 2024-02-21 00:00:07 to 2024-02-21 23:55:03
-
Overview
Global Stats
- 1,300 Number of unique normalized queries
- 53,628 Number of queries
- 8h28m13s Total query duration
- 2024-02-21 00:10:06 First query
- 2024-02-21 23:55:03 Last query
- 59 queries/s at 2024-02-21 21:17:30 Query peak
- 8h28m13s Total query duration
- 0ms Prepare/parse total duration
- 0ms Bind total duration
- 8h28m13s Execute total duration
- 1,559 Number of events
- 11 Number of unique normalized events
- 1,118 Max number of times the same event was reported
- 0 Number of cancellation
- 0 Total number of automatic vacuums
- 0 Total number of automatic analyzes
- 0 Number temporary file
- 0 Max size of temporary file
- 0.00 B Average size of temporary file
- 0 Total number of sessions
- 0 sessions at Session peak
- 0ms Total duration of sessions
- 0ms Average duration of sessions
- 53,628 Average queries per session
- 8h28m13s Average queries duration per session
- n/a Average idle time per session
- 0 Total number of connections
- 1 Total number of databases
SQL Traffic
Key values
- 59 queries/s Query Peak
- 2024-02-21 21:17:30 Date
SELECT Traffic
Key values
- 59 queries/s Query Peak
- 2024-02-21 21:17:30 Date
INSERT/UPDATE/DELETE Traffic
Key values
- 10 queries/s Query Peak
- 2024-02-21 19:02:02 Date
Queries duration
Key values
- 8h28m13s Total query duration
Prepared queries ratio
Key values
- 0.00 Ratio of bind vs prepare
- 0.00 % Ratio between prepared and "usual" statements
General Activity
Day Hour Count Min duration Max duration Avg duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Feb 21 00 144 0ms 3s510ms 748ms 33s477ms 40s655ms 40s655ms 01 76 0ms 924ms 340ms 6s278ms 6s642ms 6s642ms 02 119 0ms 2s84ms 394ms 6s469ms 6s867ms 8s344ms 03 124 0ms 775ms 283ms 5s203ms 6s71ms 8s11ms 04 121 0ms 5s802ms 456ms 8s273ms 8s465ms 8s465ms 05 105 0ms 577ms 327ms 7s315ms 7s745ms 7s745ms 06 109 0ms 632ms 328ms 7s234ms 10s470ms 10s470ms 07 136 0ms 619ms 265ms 7s324ms 10s231ms 10s231ms 08 98 0ms 731ms 394ms 9s36ms 14s927ms 14s927ms 09 272 0ms 7m22s 4s62ms 1m19s 1m55s 8m2s 10 272 0ms 6s683ms 477ms 10s465ms 11s663ms 31s276ms 11 338 0ms 32s242ms 454ms 8s991ms 12s801ms 32s559ms 12 2,334 120ms 16s535ms 483ms 36s401ms 53s468ms 59s384ms 13 4,900 120ms 3m20s 628ms 1m22s 1m57s 4m35s 14 5,797 120ms 53s391ms 513ms 1m25s 1m44s 2m18s 15 4,425 120ms 1m 469ms 1m16s 1m23s 1m43s 16 4,342 120ms 13s599ms 433ms 54s971ms 1m12s 1m21s 17 3,461 120ms 3m16s 543ms 1m1s 1m29s 3m29s 18 6,063 120ms 16s156ms 448ms 1m9s 1m28s 2m4s 19 5,436 120ms 24s290ms 504ms 1m29s 1m39s 1m53s 20 7,577 120ms 4m40s 821ms 3m20s 3m36s 7m4s 21 6,875 120ms 7s107ms 543ms 2m3s 2m41s 3m6s 22 366 0ms 9s158ms 556ms 13s21ms 17s516ms 38s718ms 23 138 0ms 1s513ms 231ms 5s252ms 5s278ms 5s866ms Day Hour SELECT COPY TO Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Feb 21 00 143 0 753ms 6s899ms 33s347ms 40s655ms 01 76 0 340ms 3s655ms 6s278ms 6s642ms 02 111 0 363ms 4s659ms 6s469ms 8s344ms 03 118 0 283ms 2s101ms 5s203ms 8s11ms 04 117 0 461ms 7s320ms 8s266ms 8s465ms 05 105 0 327ms 5s851ms 7s315ms 7s745ms 06 109 0 328ms 5s126ms 7s234ms 10s470ms 07 136 0 265ms 4s215ms 7s324ms 10s231ms 08 97 0 393ms 2s817ms 9s36ms 14s927ms 09 173 99 4s62ms 50s220ms 1m13s 7m49s 10 185 0 487ms 2s585ms 9s468ms 21s259ms 11 296 0 460ms 3s813ms 6s810ms 32s559ms 12 1,711 0 495ms 22s445ms 29s1ms 55s139ms 13 3,217 0 499ms 37s711ms 46s23ms 1m19s 14 3,827 0 400ms 40s88ms 47s209ms 1m3s 15 2,988 0 460ms 30s759ms 45s31ms 1m22s 16 2,943 0 422ms 34s99ms 37s105ms 47s658ms 17 2,344 0 494ms 26s977ms 44s656ms 1m11s 18 3,606 0 445ms 38s821ms 49s298ms 1m6s 19 3,629 0 527ms 51s327ms 1m13s 1m25s 20 5,898 0 932ms 2m37s 3m3s 3m55s 21 5,953 0 562ms 1m26s 1m57s 2m37s 22 263 0 576ms 7s334ms 9s621ms 38s718ms 23 136 0 222ms 2s909ms 3s915ms 5s866ms Day Hour INSERT UPDATE DELETE COPY FROM Average Duration Latency Percentile(90) Latency Percentile(95) Latency Percentile(99) Feb 21 00 0 0 0 0 0ms 0ms 0ms 0ms 01 0 0 0 0 0ms 0ms 0ms 0ms 02 0 8 0 0 818ms 0ms 0ms 4s148ms 03 0 6 0 0 271ms 0ms 0ms 910ms 04 0 4 0 0 323ms 0ms 0ms 660ms 05 0 0 0 0 0ms 0ms 0ms 0ms 06 0 0 0 0 0ms 0ms 0ms 0ms 07 0 0 0 0 0ms 0ms 0ms 0ms 08 0 1 0 0 499ms 0ms 0ms 499ms 09 0 0 0 0 0ms 0ms 0ms 0ms 10 0 86 1 0 456ms 0ms 0ms 9s867ms 11 1 40 1 0 409ms 0ms 0ms 3s604ms 12 29 583 11 0 452ms 3s479ms 6s811ms 18s827ms 13 65 1,192 424 0 874ms 21s150ms 28s886ms 40s934ms 14 63 1,389 517 0 734ms 20s412ms 30s895ms 45s411ms 15 51 1,354 28 0 489ms 9s875ms 14s735ms 28s454ms 16 39 1,321 34 0 458ms 8s437ms 17s181ms 36s925ms 17 16 1,077 18 0 647ms 8s203ms 11s666ms 27s557ms 18 68 2,318 67 0 453ms 18s942ms 24s966ms 38s526ms 19 62 1,722 22 0 457ms 15s241ms 22s895ms 32s83ms 20 73 1,568 34 0 434ms 10s554ms 18s482ms 36s877ms 21 53 850 15 0 425ms 5s131ms 10s688ms 21s979ms 22 6 94 3 0 504ms 628ms 2s561ms 9s180ms 23 0 1 1 0 908ms 0ms 0ms 1s513ms Day Hour Prepare Bind Bind/Prepare Percentage of prepare Feb 21 00 0 0 0.00 0.00% 01 0 0 0.00 0.00% 02 0 0 0.00 0.00% 03 0 0 0.00 0.00% 04 0 0 0.00 0.00% 05 0 0 0.00 0.00% 06 0 0 0.00 0.00% 07 0 0 0.00 0.00% 08 0 0 0.00 0.00% 09 0 0 0.00 0.00% 10 0 0 0.00 0.00% 11 0 0 0.00 0.00% 12 0 0 0.00 0.00% 13 0 0 0.00 0.00% 14 0 0 0.00 0.00% 15 0 0 0.00 0.00% 16 0 0 0.00 0.00% 17 0 0 0.00 0.00% 18 0 0 0.00 0.00% 19 0 0 0.00 0.00% 20 0 0 0.00 0.00% 21 0 0 0.00 0.00% 22 0 0 0.00 0.00% 23 0 0 0.00 0.00% Day Hour Count Average / Second Feb 21 00 0 0.00/s 01 0 0.00/s 02 0 0.00/s 03 0 0.00/s 04 0 0.00/s 05 0 0.00/s 06 0 0.00/s 07 0 0.00/s 08 0 0.00/s 09 0 0.00/s 10 0 0.00/s 11 0 0.00/s 12 0 0.00/s 13 0 0.00/s 14 0 0.00/s 15 0 0.00/s 16 0 0.00/s 17 0 0.00/s 18 0 0.00/s 19 0 0.00/s 20 0 0.00/s 21 0 0.00/s 22 0 0.00/s 23 0 0.00/s Day Hour Count Average Duration Average idle time Feb 21 00 0 0ms 0ms 01 0 0ms 0ms 02 0 0ms 0ms 03 0 0ms 0ms 04 0 0ms 0ms 05 0 0ms 0ms 06 0 0ms 0ms 07 0 0ms 0ms 08 0 0ms 0ms 09 0 0ms 0ms 10 0 0ms 0ms 11 0 0ms 0ms 12 0 0ms 0ms 13 0 0ms 0ms 14 0 0ms 0ms 15 0 0ms 0ms 16 0 0ms 0ms 17 0 0ms 0ms 18 0 0ms 0ms 19 0 0ms 0ms 20 0 0ms 0ms 21 0 0ms 0ms 22 0 0ms 0ms 23 0 0ms 0ms -
Connections
Established Connections
Key values
- 0 connections Connection Peak
- Date
Connections per database
Key values
- unknown Main Database
- 0 connections Total
Connections per user
Key values
- unknown Main User
- 0 connections Total
-
Sessions
Simultaneous sessions
Key values
- 0 sessions Session Peak
- Date
Histogram of session times
Key values
- duration
Sessions per database
Key values
- unknown Main Database
- 0 sessions Total
Sessions per user
Key values
- unknown Main User
- 0 sessions Total
Sessions per host
Key values
- unknown Main Host
- 0 sessions Total
-
Checkpoints / Restartpoints
Checkpoints Buffers
Key values
- 0 buffers Checkpoint Peak
- Date
- seconds Highest write time
- seconds Sync time
Checkpoint write buffers (5 minutes period)
NO DATASET
Checkpoints Wal files
Key values
- 0 files Wal files usage Peak
- Date
Checkpoint Wal files usage (5 minutes period)
NO DATASET
Checkpoints distance
Key values
- 0 Mo Distance Peak
- Date
Checkpoints Activity
Day Hour Written buffers Write time Sync time Total time Feb 21 00 0 0s 0s 0s 01 0 0s 0s 0s 02 0 0s 0s 0s 03 0 0s 0s 0s 04 0 0s 0s 0s 05 0 0s 0s 0s 06 0 0s 0s 0s 07 0 0s 0s 0s 08 0 0s 0s 0s 09 0 0s 0s 0s 10 0 0s 0s 0s 11 0 0s 0s 0s 12 0 0s 0s 0s 13 0 0s 0s 0s 14 0 0s 0s 0s 15 0 0s 0s 0s 16 0 0s 0s 0s 17 0 0s 0s 0s 18 0 0s 0s 0s 19 0 0s 0s 0s 20 0 0s 0s 0s 21 0 0s 0s 0s 22 0 0s 0s 0s 23 0 0s 0s 0s Day Hour Added Removed Recycled Synced files Longest sync Average sync Feb 21 00 0 0 0 0 0s 0s 01 0 0 0 0 0s 0s 02 0 0 0 0 0s 0s 03 0 0 0 0 0s 0s 04 0 0 0 0 0s 0s 05 0 0 0 0 0s 0s 06 0 0 0 0 0s 0s 07 0 0 0 0 0s 0s 08 0 0 0 0 0s 0s 09 0 0 0 0 0s 0s 10 0 0 0 0 0s 0s 11 0 0 0 0 0s 0s 12 0 0 0 0 0s 0s 13 0 0 0 0 0s 0s 14 0 0 0 0 0s 0s 15 0 0 0 0 0s 0s 16 0 0 0 0 0s 0s 17 0 0 0 0 0s 0s 18 0 0 0 0 0s 0s 19 0 0 0 0 0s 0s 20 0 0 0 0 0s 0s 21 0 0 0 0 0s 0s 22 0 0 0 0 0s 0s 23 0 0 0 0 0s 0s Day Hour Count Avg time (sec) Feb 21 00 0 0s 01 0 0s 02 0 0s 03 0 0s 04 0 0s 05 0 0s 06 0 0s 07 0 0s 08 0 0s 09 0 0s 10 0 0s 11 0 0s 12 0 0s 13 0 0s 14 0 0s 15 0 0s 16 0 0s 17 0 0s 18 0 0s 19 0 0s 20 0 0s 21 0 0s 22 0 0s 23 0 0s Day Hour Mean distance Mean estimate Feb 21 00 0.00 kB 0.00 kB 01 0.00 kB 0.00 kB 02 0.00 kB 0.00 kB 03 0.00 kB 0.00 kB 04 0.00 kB 0.00 kB 05 0.00 kB 0.00 kB 06 0.00 kB 0.00 kB 07 0.00 kB 0.00 kB 08 0.00 kB 0.00 kB 09 0.00 kB 0.00 kB 10 0.00 kB 0.00 kB 11 0.00 kB 0.00 kB 12 0.00 kB 0.00 kB 13 0.00 kB 0.00 kB 14 0.00 kB 0.00 kB 15 0.00 kB 0.00 kB 16 0.00 kB 0.00 kB 17 0.00 kB 0.00 kB 18 0.00 kB 0.00 kB 19 0.00 kB 0.00 kB 20 0.00 kB 0.00 kB 21 0.00 kB 0.00 kB 22 0.00 kB 0.00 kB 23 0.00 kB 0.00 kB -
Temporary Files
Size of temporary files
Key values
- 0 Temp Files size Peak
- Date
Size of temporary files (5 minutes period)
NO DATASET
Number of temporary files
Key values
- 0 per second Temp Files Peak
- Date
Number of temporary files (5 minutes period)
NO DATASET
Temporary Files Activity
Day Hour Count Total size Average size Feb 21 00 0 0 0 01 0 0 0 02 0 0 0 03 0 0 0 04 0 0 0 05 0 0 0 06 0 0 0 07 0 0 0 08 0 0 0 09 0 0 0 10 0 0 0 11 0 0 0 12 0 0 0 13 0 0 0 14 0 0 0 15 0 0 0 16 0 0 0 17 0 0 0 18 0 0 0 19 0 0 0 20 0 0 0 21 0 0 0 22 0 0 0 23 0 0 0 -
Vacuums
Vacuums / Analyzes Distribution
Key values
- 0 sec Highest CPU-cost vacuum
Table
Database - Date
- 0 sec Highest CPU-cost analyze
Table
Database - Date
Autovacuum actions (5 minutes period)
NO DATASET
Analyzes per table
Key values
- unknown (0) Main table analyzed (database )
- 0 analyzes Total
Vacuums per table
Key values
- unknown (0) Main table vacuumed on database
- 0 vacuums Total
Tuples removed per table
Key values
- unknown (0) Main table with removed tuples on database
- 0 tuples Total removed
Pages removed per table
Key values
- unknown (0) Main table with removed pages on database unknown
- 0 pages Total removed
Autovacuum Activity
Day Hour VACUUMs ANALYZEs Feb 21 00 0 0 01 0 0 02 0 0 03 0 0 04 0 0 05 0 0 06 0 0 07 0 0 08 0 0 09 0 0 10 0 0 11 0 0 12 0 0 13 0 0 14 0 0 15 0 0 16 0 0 17 0 0 18 0 0 19 0 0 20 0 0 21 0 0 22 0 0 23 0 0 - 0 sec Highest CPU-cost vacuum
-
Locks
Locks by types
Key values
- ShareLock Main Lock Type
- 23 locks Total
Most frequent waiting queries (N)
Rank Count Total time Min time Max time Avg duration Query 1 3 4m1s 42s295ms 3m14s 1m20s update account_move set write_date = write_date where id = ( select id from account_move where journal_id = ? and name != ? and sequence_prefix !~ ? and move_type not in (...) and sequence_prefix = ( select sequence_prefix from account_move where journal_id = ? and name != ? and sequence_prefix !~ ? and move_type not in (...) order by id desc limit ?) order by sequence_number desc limit ?) returning name;-
UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;
Date: 2024-02-21 17:31:12
2 13 1m8s 1s211ms 43s732ms 5s303ms update account_move set write_date = write_date where id = ( select id from account_move where journal_id = ? and name != ? and sequence_prefix !~ ? and move_type not in (...) and id != ? and sequence_prefix = ( select sequence_prefix from account_move where journal_id = ? and name != ? and sequence_prefix !~ ? and move_type not in (...) and id != ? order by id desc limit ?) order by sequence_number desc limit ?) returning name;-
UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1222122 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1222122 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;
Date: 2024-02-21 19:54:00
-
UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1220109 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1220109 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;
Date: 2024-02-21 14:07:28
3 1 48s99ms 48s99ms 48s99ms 48s99ms update "bus_presence" set "last_poll" = ?, "last_presence" = ? where id in (...);-
UPDATE "bus_presence" SET "last_poll" = '2024-02-21 19:49:21', "last_presence" = '2024-02-21 19:48:12.628031' WHERE id IN (17);
Date: 2024-02-21 19:50:10
4 1 8s70ms 8s70ms 8s70ms 8s70ms alter table "vendor_account_master" add constraint "vendor_account_master_unique_acc_no" unique (account_number);-
ALTER TABLE "vendor_account_master" ADD CONSTRAINT "vendor_account_master_unique_acc_no" unique (account_number);
Date: 2024-02-21 09:17:32
5 3 7s761ms 3s37ms 3s37ms 2s587ms update "account_move" set "message_main_attachment_id" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "account_move" SET "message_main_attachment_id" = 5089356, "write_uid" = 994, "write_date" = (now() at time zone 'UTC') WHERE id IN (1220246);
Date: 2024-02-21 14:30:17
6 1 6s477ms 6s477ms 6s477ms 6s477ms delete from ir_attachment where id in (...);-
DELETE FROM ir_attachment WHERE id IN (5084570, 5084569, 5084568, 5084567);
Date: 2024-02-21 01:24:48
7 1 1s1ms 1s1ms 1s1ms 1s1ms update "sale_order_line" set "branch_id" = ?, "currency_id" = ?, "cus_date_order" = ?, "cus_part_route" = ?, "cus_user_id" = ?, "inventory_vendor_id" = ?, "is_core" = false, "is_service" = false, "margin" = ?, "margin_percent" = ?.?, "order_partner_id" = ?, "price_reduce" = ?, "price_reduce_taxexcl" = ?, "price_reduce_taxinc" = ?, "price_subtotal" = ?, "price_tax" = ?.?, "price_total" = ?, "purchase_price" = ?, "qty_delivered_method" = ?, "qty_invoiced" = ?, "qty_to_invoice" = ?, "salesman_id" = ?, "untaxed_amount_invoiced" = ?, "untaxed_amount_to_invoice" = ?, "warehouse_id" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);-
UPDATE "sale_order_line" SET "branch_id" = 38, "currency_id" = 2, "cus_date_order" = '2024-02-21 20:51:51', "cus_part_route" = 10, "cus_user_id" = 961, "inventory_vendor_id" = 3091, "is_core" = false, "is_service" = false, "margin" = '4.70', "margin_percent" = 0.3122923588039867, "order_partner_id" = 37954, "price_reduce" = '15.05', "price_reduce_taxexcl" = '15.05', "price_reduce_taxinc" = '15.05', "price_subtotal" = '15.05', "price_tax" = 0.0, "price_total" = '15.05', "purchase_price" = '10.35', "qty_delivered_method" = 'stock_move', "qty_invoiced" = '0.00', "qty_to_invoice" = '0.00', "salesman_id" = 961, "untaxed_amount_invoiced" = '0.00', "untaxed_amount_to_invoice" = '0.00', "warehouse_id" = 36, "write_uid" = 961, "write_date" = (now() at time zone 'UTC') WHERE id IN (344464);
Date: 2024-02-21 20:52:49
-
UPDATE "sale_order_line" SET "branch_id" = 46, "currency_id" = 2, "cus_date_order" = '2024-02-21 19:43:02', "cus_part_route" = 31, "cus_user_id" = 1009, "inventory_vendor_id" = 2960, "is_core" = false, "is_service" = false, "margin" = '17.74', "margin_percent" = 0.3601299228583029, "order_partner_id" = 33500, "price_reduce" = '24.63', "price_reduce_taxexcl" = '24.63', "price_reduce_taxinc" = '24.63', "price_subtotal" = '49.26', "price_tax" = 0.0, "price_total" = '49.26', "purchase_price" = '15.76', "qty_delivered_method" = 'stock_move', "qty_invoiced" = '0.00', "qty_to_invoice" = '0.00', "salesman_id" = 1009, "untaxed_amount_invoiced" = '0.00', "untaxed_amount_to_invoice" = '0.00', "warehouse_id" = 43, "write_uid" = 953, "write_date" = (now() at time zone 'UTC') WHERE id IN (344398);
Date: 2024-02-21 19:46:52
-
UPDATE "sale_order_line" SET "branch_id" = 46, "currency_id" = 2, "cus_date_order" = '2024-02-21 19:43:02', "cus_part_route" = 31, "cus_user_id" = 1009, "inventory_vendor_id" = 3069, "is_core" = false, "is_service" = false, "margin" = '49.48', "margin_percent" = 0.5099979385693671, "order_partner_id" = 33500, "price_reduce" = '48.51', "price_reduce_taxexcl" = '48.51', "price_reduce_taxinc" = '48.51', "price_subtotal" = '97.02', "price_tax" = 0.0, "price_total" = '97.02', "purchase_price" = '23.77', "qty_delivered_method" = 'stock_move', "qty_invoiced" = '0.00', "qty_to_invoice" = '0.00', "salesman_id" = 1009, "untaxed_amount_invoiced" = '0.00', "untaxed_amount_to_invoice" = '0.00', "warehouse_id" = 43, "write_uid" = 953, "write_date" = (now() at time zone 'UTC') WHERE id IN (344396);
Date: 2024-02-21 19:44:56
Queries that waited the most
Rank Wait time Query 1 3m14s UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-02-21 17:44:33 ]
2 48s99ms UPDATE "bus_presence" SET "last_poll" = '2024-02-21 19:49:21', "last_presence" = '2024-02-21 19:48:12.628031' WHERE id IN (17);[ Date: 2024-02-21 19:50:10 ]
3 43s732ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1220398 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1220398 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-02-21 15:04:42 ]
4 42s295ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-02-21 17:31:12 ]
5 8s70ms ALTER TABLE "vendor_account_master" ADD CONSTRAINT "vendor_account_master_unique_acc_no" unique (account_number);[ Date: 2024-02-21 09:17:32 ]
6 6s477ms DELETE FROM ir_attachment WHERE id IN (5084570, 5084569, 5084568, 5084567);[ Date: 2024-02-21 01:24:48 ]
7 4s569ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1222573 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1222573 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-02-21 21:53:39 ]
8 4s305ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 2 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-02-21 16:48:18 ]
9 3s554ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1220324 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1220324 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-02-21 14:48:32 ]
10 3s37ms UPDATE "account_move" SET "message_main_attachment_id" = 5089356, "write_uid" = 994, "write_date" = (now() at time zone 'UTC') WHERE id IN (1220246);[ Date: 2024-02-21 14:30:17 ]
11 2s785ms UPDATE "account_move" SET "message_main_attachment_id" = 5088998, "write_uid" = 1026, "write_date" = (now() at time zone 'UTC') WHERE id IN (1220011);[ Date: 2024-02-21 13:35:27 ]
12 2s748ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1140451 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1140451 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-02-21 16:34:10 ]
13 2s256ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1220708 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1220708 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-02-21 16:20:34 ]
14 2s42ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1220109 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1220109 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-02-21 14:07:28 ]
15 1s978ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1165920 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1165920 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-02-21 15:25:06 ]
16 1s938ms UPDATE "account_move" SET "message_main_attachment_id" = 5089089, "write_uid" = 990, "write_date" = (now() at time zone 'UTC') WHERE id IN (1220046);[ Date: 2024-02-21 13:48:19 ]
17 1s854ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1116101 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1116101 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-02-21 14:48:34 ]
18 1s362ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1186997 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1186997 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-02-21 14:46:51 ]
19 1s350ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1220029 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1220029 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-02-21 13:38:37 ]
20 1s266ms UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1222122 AND sequence_prefix = ( SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1222122 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1) RETURNING name;[ Date: 2024-02-21 19:54:00 ]
-
Queries
Queries by type
Key values
- 38,181 Total read queries
- 15,447 Total write queries
Queries by database
Key values
- unknown Main database
- 53,628 Requests
- 8h28m13s (unknown)
- Main time consuming database
Queries by user
Key values
- unknown Main user
- 53,702 Requests
User Request type Count Duration unknown Total 53,702 8h29m34s copy to 99 17m22s cte 32 9s376ms delete 1,181 40m41s insert 526 1m55s select 38,249 5h51m3s update 13,615 1h38m22s Duration by user
Key values
- 8h29m34s (unknown) Main time consuming user
User Request type Count Duration unknown Total 53,702 8h29m34s copy to 99 17m22s cte 32 9s376ms delete 1,181 40m41s insert 526 1m55s select 38,249 5h51m3s update 13,615 1h38m22s Queries by host
Key values
- unknown Main host
- 53,702 Requests
- 8h29m34s (unknown)
- Main time consuming host
Queries by application
Key values
- unknown Main application
- 53,628 Requests
- 8h28m13s (unknown)
- Main time consuming application
Number of cancelled queries
Key values
- 0 per second Cancelled query Peak
- 2024-02-21 09:40:09 Date
Number of cancelled queries (5 minutes period)
NO DATASET
-
Top Queries
Histogram of query times
Key values
- 35,162 100-500ms duration
Slowest individual queries
Rank Duration Query 1 7m22s COPY public.mail_tracking_value (id, field, field_desc, field_type, old_value_integer, old_value_float, old_value_monetary, old_value_char, old_value_text, old_value_datetime, new_value_integer, new_value_float, new_value_monetary, new_value_char, new_value_text, new_value_datetime, mail_message_id, tracking_sequence, create_uid, create_date, write_uid, write_date) TO stdout;[ Date: 2024-02-21 09:12:32 ]
2 4m40s SELECT min("sale_history_line".id) AS id, count("sale_history_line".id) AS "user_id_count", sum("sale_history_line"."product_uom_qty") AS "product_uom_qty", sum("sale_history_line"."cost_price_unit") AS "cost_price_unit", sum("sale_history_line"."cost_subtotal") AS "cost_subtotal", sum("sale_history_line"."price_unit") AS "price_unit", sum("sale_history_line"."price_subtotal") AS "price_subtotal", sum("sale_history_line"."gross_profit") AS "gross_profit", "sale_history_line"."user_id" as "user_id" FROM "sale_history_line" LEFT JOIN "res_users" AS "sale_history_line__user_id" ON ("sale_history_line"."user_id" = "sale_history_line__user_id"."id") LEFT JOIN "res_partner" AS "sale_history_line__user_id__partner_id" ON ("sale_history_line__user_id"."partner_id" = "sale_history_line__user_id__partner_id"."id") WHERE (((("sale_history_line"."invoice_date" >= '2023-01-01') AND ("sale_history_line"."invoice_date" <= '2023-12-31')) AND ((unaccent ("sale_history_line"."invoice_number"::text) not ilike unaccent ('%x%')) OR "sale_history_line"."invoice_number" IS NULL)) AND ((unaccent ("sale_history_line"."invoice_number"::text) not ilike unaccent ('%q%')) OR "sale_history_line"."invoice_number" IS NULL)) GROUP BY "sale_history_line"."user_id", "sale_history_line__user_id__partner_id"."name", "sale_history_line__user_id"."login" ORDER BY "sale_history_line__user_id__partner_id"."name", "sale_history_line__user_id"."login" LIMIT 80;[ Date: 2024-02-21 20:20:47 ]
3 3m20s DELETE FROM account_move_line WHERE id IN (4247560, 4247561, 4247562, 4247563, 4247564, 4247565, 4247566, 4247567, 4247568, 4247569, 4247570, 4247571, 4247572, 4247573, 4247574, 4247575, 4247576, 4247577, 4247578, 4247579, 4247580, 4247581, 4247582, 4247583, 4247584, 4247585, 4247586, 4247587, 4247588, 4247589, 4247590, 4247591, 4247592, 4247593, 4247594, 4247595, 4247596, 4247597, 4247598, 4247599, 4247600, 4247601, 4247602, 4247603, 4247604, 4247605, 4247606, 4247607, 4247608, 4247609, 4247610, 4247611, 4247612, 4247613, 4247614, 4247615, 4247616, 4247617, 4247618, 4247619, 4247620, 4247621, 4247622, 4247623, 4247624, 4247625, 4247626, 4247627, 4247628, 4247629, 4247630, 4247631, 4247632, 4247633, 4247634, 4247635, 4247636, 4247637, 4247638, 4247639, 4247640, 4247641, 4247642, 4247643, 4247644, 4247645, 4247646, 4247647, 4247648, 4247649, 4247650, 4247651, 4247652, 4247653, 4247654, 4247655, 4247656, 4247657, 4247658, 4247659, 4247660, 4247661, 4247662, 4247663, 4247664, 4247665, 4247666, 4247667, 4247668, 4247669, 4247670, 4247671, 4247672, 4247673, 4247674, 4247675, 4247676, 4247677, 4247678, 4247679, 4247680, 4247681, 4247682, 4247683, 4247684, 4247685, 4247686, 4247687, 4247688, 4247689);[ Date: 2024-02-21 13:30:46 ]
4 3m16s DELETE FROM account_move_line WHERE id IN (4253825, 4253826, 4253827, 4253828, 4253829, 4253830, 4253831, 4253832, 4253833, 4253834, 4253835, 4253836, 4253837, 4253838, 4253839, 4253840, 4253841, 4253842, 4253843, 4253844, 4253845, 4253846, 4253847, 4253848, 4253849, 4253850, 4253851, 4253852, 4253853, 4253854, 4253855, 4253856, 4253857, 4253858, 4253859, 4253860, 4253861, 4253862, 4253863, 4253864, 4253865, 4253866, 4253867, 4253868, 4253869, 4253870, 4253871, 4253872, 4253873, 4253874, 4253875, 4253876, 4253877, 4253878, 4253879, 4253880, 4253881, 4253882, 4253883, 4253884, 4253885, 4253886, 4253887, 4253888, 4253889, 4253890, 4253891, 4253892, 4253893, 4253894, 4253895, 4253896, 4253897, 4253898, 4253899, 4253900, 4253901, 4253902, 4253903, 4253904, 4253905, 4253906, 4253907, 4253908, 4253909, 4253910, 4253911, 4253912, 4253913, 4253914, 4253915, 4253916, 4253917, 4253918, 4253919, 4253920, 4253921, 4253922, 4253923, 4253924, 4253925, 4253926, 4253927, 4253928, 4253929, 4253930, 4253931, 4253932, 4253933, 4253934, 4253935, 4253936, 4253937, 4253938, 4253939, 4253940, 4253941, 4253942, 4253943, 4253944, 4253945, 4253946, 4253947, 4253948, 4253949, 4253950, 4253951, 4253952, 4253953, 4253954);[ Date: 2024-02-21 17:44:30 ]
5 1m41s COPY public.item_list_line (id, item_demand_plan_id, product_id, selling_branch, product_uom_qty, invoice_date, warehouse_id, method, inventory_vendor_id, create_uid, create_date, write_uid, write_date, active, min_product_len_1, min_product_len_2, min_baseline_size, seasonal_period, supercede_product_id, superceded, campaign_id, source_id, medium_id, message_main_attachment_id, access_token, ref_id, ref) TO stdout;[ Date: 2024-02-21 09:03:20 ]
6 1m34s COPY public.mail_message (id, subject, date, body, parent_id, model, res_id, record_name, message_type, subtype_id, mail_activity_type_id, is_internal, email_from, author_id, no_auto_thread, message_id, reply_to, mail_server_id, moderation_status, moderator_id, email_layout_xmlid, add_sign, create_uid, create_date, write_uid, write_date, email_cc, email_bcc, email_to, ks_email_cc_string, ks_email_bcc_string, ks_cc_partners, ks_bcc_partners) TO stdout;[ Date: 2024-02-21 09:05:09 ]
7 1m17s DELETE FROM account_move_line WHERE id IN (4253649, 4253650, 4253651, 4253652, 4253653, 4253654, 4253655, 4253656, 4253657, 4253658, 4253659, 4253660, 4253661, 4253662, 4253663, 4253664, 4253665, 4253666, 4253667, 4253668, 4253669, 4253670, 4253671, 4253672, 4253673, 4253674, 4253675, 4253676, 4253677, 4253678, 4253679, 4253680, 4253681, 4253682, 4253683, 4253684, 4253685, 4253686, 4253687, 4253688, 4253689, 4253690, 4253691, 4253692, 4253693, 4253694, 4253695, 4253696, 4253697, 4253698, 4253699);[ Date: 2024-02-21 17:31:11 ]
8 1m13s COPY public.website_visitor (id, name, access_token, active, website_id, partner_id, country_id, lang_id, timezone, visit_count, create_date, last_connection_datetime, create_uid, write_uid, write_date) TO stdout;[ Date: 2024-02-21 09:17:32 ]
9 1m DELETE FROM account_move_line WHERE id IN (4251663, 4251664, 4251665, 4251666, 4251667, 4251668, 4251669, 4251670, 4251671, 4251672, 4251673, 4251674, 4251675, 4251676, 4251677, 4251678, 4251679, 4251680, 4251681, 4251682, 4251683, 4251684, 4251685, 4251686, 4251687, 4251688, 4251689, 4251690, 4251691, 4251692, 4251693, 4251694, 4251695, 4251696, 4251697, 4251698, 4251699, 4251700, 4251701, 4251702);[ Date: 2024-02-21 15:04:40 ]
10 58s998ms DELETE FROM account_move_line WHERE id IN (4247139, 4247140, 4247141, 4247142, 4247143, 4247144, 4247145, 4247146, 4247147, 4247148, 4247149, 4247150, 4247151, 4247152, 4247153, 4247154, 4247155, 4247156, 4247157, 4247158, 4247159, 4247160, 4247161, 4247162, 4247163, 4247164, 4247165, 4247166, 4247167, 4247168, 4247169, 4247170, 4247171, 4247172, 4247173, 4247174, 4247175, 4247176, 4247177);[ Date: 2024-02-21 13:18:36 ]
11 53s968ms DELETE FROM account_move_line WHERE id IN (4247815, 4247816, 4247817, 4247818, 4247819, 4247820, 4247821, 4247822, 4247823, 4247824, 4247825, 4247826, 4247827, 4247828, 4247829, 4247830, 4247831, 4247832, 4247833, 4247834, 4247836, 4247837, 4247838, 4247839, 4247840, 4247842, 4247843, 4247844, 4247845, 4247854, 4247884, 4247900, 4247903, 4247936, 4247939);[ Date: 2024-02-21 15:00:21 ]
12 53s391ms DELETE FROM account_move_line WHERE id IN (4247815, 4247816, 4247817, 4247818, 4247819, 4247820, 4247821, 4247822, 4247823, 4247824, 4247825, 4247826, 4247827, 4247828, 4247829, 4247830, 4247831, 4247832, 4247833, 4247834, 4247836, 4247837, 4247838, 4247839, 4247840, 4247842, 4247843, 4247844, 4247845, 4247854, 4247884, 4247900, 4247903, 4247936, 4247939);[ Date: 2024-02-21 14:58:01 ]
13 50s220ms COPY public.website_track (id, visitor_id, page_id, url, visit_datetime, product_id) TO stdout;[ Date: 2024-02-21 09:16:18 ]
14 38s475ms UPDATE "stock_move" SET "date" = '2024-02-21 20:50:22', "state" = 'done', "write_uid" = 1038, "write_date" = (now() at time zone 'UTC') WHERE id IN (815029, 815030, 815031, 815032, 815033, 815034, 815036, 815038, 815039, 815040, 815042, 815043, 815044, 815045, 815046, 815047, 815048, 815049, 815050, 815051, 815052, 815054, 815055, 815056, 815057, 815058, 815060, 815061, 815063, 815065, 815066, 815067, 815069, 815072, 815073, 815074, 815077, 815078, 815079, 815080, 815081, 815082, 815083, 815084, 815085, 815086, 815087, 815089, 815090, 815091, 815092, 815093, 815094, 815095);[ Date: 2024-02-21 20:51:01 ]
15 34s821ms DELETE FROM product_pricelist_item WHERE id IN (25246, 25245, 25244, 25243, 25242, 25241, 25240, 25237, 25236, 25238, 25239);[ Date: 2024-02-21 13:21:53 ]
16 32s372ms SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 5 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 6 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 7 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 8 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 9 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 10 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 11 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id;[ Date: 2024-02-21 20:19:57 ]
17 32s255ms SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 5 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 6 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 7 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 8 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 9 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 10 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 11 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id;[ Date: 2024-02-21 20:20:00 ]
18 32s242ms SELECT "product_product".id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (("product_product"."active" = true) AND (("product_product"."id" not in (5,6,7,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,19544,19545,19546,19547,19548,19549,19550,19551,19552,19553,19554,19555,19556,19557,19558,19559,19560,19561,19562,19563,19564,19565,19566,19567,19568,19569,19570,19571,19572,19573,19574,19575,19576,19577,19578,19579,19580,19581,19582,19583,19584,19585,19586,19587,19588,19589,19590,19591,19592,19593,19594,19595,19596,19597,19598,19599,19600,19601,19602,19603,19604,19605,19606,19607,19608,19609,19610,19611,19612,19613,19614,19615,19616,19617,19618,19619,19620,19621,19622,19623,19624,19625,19626,19627,19628,19629,19630,19631,19632,19633,19634,19635,19636,19637,19638,19639,19640,19641,19642,19643,19644,19645,19646,19647,19648,19649,19650,19651,19652,19653,19654,19655,19656,19657,19658,19659,19660,19661,19662,19663,19664,19665,19666,19667,19668,19669,19670,19671,19672,19673,19674,19675,19676,19677,19678,19679,19680,19681,19682,19683,19684,19685,19686,19687,19688,19689,19690,19691,19692,19693,19694,19695,19696,19697,19698,19699,19700,19701,19702,19703,19704,19705,19706,19707,19708,19709,19710,19711,19712,19713,19714,19715,19716,19717,19718,19719,19720,19721,19722,19723,19724,19725,19726,19727,19728,19729,19730,19731,19732,19733,19734,19735,19736,19737,19738,19739,19740,19741,19742,19743,19744,19745,19746,19747,19748,19749,19750,19751,19752,19753,19754,19755,19756,19757,19758,19759,19760,19761,19762,19763,19764,19765,19766,19767,19768,19769,19770,19771,19772,19773,19774,19775,19776,19777,19778,19779,19780,19781,19782,19783,19784,19785,19786,19787,19788,19789,19790,19791,19792,19793,19794,19795,19796,19797,19798,19799,19800,19801,19802,19803,19804,19805,19806,19807,19808,19809,19810,19811,19812,19813,19814,19815,19816,19817,19818,19819,19820,19821,19822,19823,19824,19825,19826,19827,19828,19829,19830,19831,19832,19833,19834,19835,19836,19837,19838,19839,19840,19841,19842,19843,19844,19845,19846,19847,19848,19849,19850,19851,19852,19853,19854,19855,19856,19857,19858,19859,19860,19861,19862,19863,19864,19865,19866,19867,19868,19869,19870,19871,19872,19873,19874,19875,19876,19877,19878,19879,19880,19881,19882,19883,19884,19885,19886,19887,19888,19889,19890,19891,19892,19893,19894,19895,19896,19897,19898,19899,19900,19901,19902,19903,19904,19905,19906,19907,19908,19909,19910,19911,19912,19913,19914,19915,19916,19917,19918,19919,19920,19921,19922,19923,19924,19925,19926,19927,19928,19929,19930,19931,19932,19933,19934,19935,19936,19937,19938,19939,19940,19941,19942,19943,19944,19945,19946,19947,19948,19949,19950,19951,19952,19953,19954,19955,19956,19957,19958,19959,19960,19961,19962,19963,19964,19965,19966,19967,19968,19969,19970,19971,19972,19973,19974,19975,19976,19977,19978,19979,19980,19981,19982,19983,19984,19985,19986,19987,19988,19989,19990,19991,19992,19993,19994,19995,19996,19997,19998,19999,20000,20001,20002,20003,20004,20005,20006,20007,20008,20009,20010,20011,20012,20013,20014,20015,20016,20017,20018,20019,20020,20021,20022,20023,20024,20025,20026,20027,20028,20029,20030,20031,20032,20033,20034,20035,20036,20037,20038,20039,20040,20041,20042,20043,20044,20045,20046,20047,20048,20049,20050,20051,20052,20053,20054,20055,20056,20057,20058,20059,20060,20061,20062,20063,20064,20065,20066,20067,20068,20069,20070,20071,20072,20073,20074,20075,20076,20077,20078,20079,20080,20081,20082,20083,20084,20085,20086,20087,20088,20089,20090,20091,20092,20093,20094,20095,20096,20097,20098,20099,20100,20101,20102,20103,20104,20105,20106,20107,20108,20109,20110,20111,20112,20113,20114,20115,20116,20117,20118,20119,20120,20121,20122,20123,20124,20125,20126,20127,20128,20129,20130,20131,20132,20133,20134,20135,20136,20137,20138,20139,20140,20141,20142,20143,20144,20145,20146,20147,20148,20149,20150,20151,20152,20153,20154,20155,20156,20157,20158,20159,20160,20161,20162,20163,20164,20165,20166,20167,20168,20169,20170,20171,20172,20173,20174,20175,20176,20177,20178,20179,20180,20181,20182,20183,20184,20185,20186,20187,20188,20189,20190,20191,20192,20193,20194,20195,20196,20197,20198,20199,20200,20201,20202,20203,20204,20205,20206,20207,20208,20209,20210,20211,20212,20213,20214,20215,20216,20217,20218,20219,20220,20221,20222,20223,20224,20225,20226,20227,20228,20229,20230,20231,20232,20233,20234,20235,20236,20237,20238,20239,20240,20241,20242,20243,20244,20245,20246,20247,20248,20249,20250,20251,20252,20253,20254,20255,20256,20257,20258,20259,20260,20261,20262,20263,20264,20265,20266,20267,20268,20269,20270,20271,20272,20273,20274,20275,20276,20277,20278,20279,20280,20281,20282,20283,20284,20285,20286,20287,20288,20289,20290,20291,20292,20293,20294,20295,20296,20297,20298,20299,20300,20301,20302,20303,20304,20305,20306,20307,20308,20309,20310,20311,20312,20313,20314,20315,20316,20317,20318,20319,20320,20321,20322,20323,20324,20325,20326,20327,20328,20329,20330,20331,20332,20333,20334,20335,20336,20337,20338,20339,20340,20341,20342,20343,20344,20345,20346,20347,20348,20349,20350,20351,20352,20353,20354,20355,20356,20357,20358,20359,20360,20361,20362,20363,20364,20365,20366,20367,20368,20369,20370,20371,20372,20373,20374,20375,20376,20377,20378,20379,20380,20381,20382,20383,20384,20385,20386,20387,20388,20389,20390,20391,20392,20393,20394,20395,20396,20397,20398,20399,20400,20401,20402,20403,20404,20405,20406,20407,20408,20409,20410,20411,20412,20413,20414,20415,20416,20417,20418,20419,20420,20421,20422,20423,20424,20425,20426,20427,20428,20429,20430,20431,20432,20433,20434,20435,20436,20437,20438,20439,20440,20441,20442,20443,20444,20445,20446,20447,20448,20449,20450,20451,20452,20453,20454,20455,20456,20457,20458,20459,20460,20461,20462,20463,20464,20465,20466,20467,20468,20469,20470,20471,20472,20473,20474,20475,20476,20477,20478,20479,20480,20481,20482,20483,20484,20485,20486,20487,20488,20489,20490,20491,20492,20493,20494,20495,20496,20497,20498,20499,20500,20501,20502,20503,20504,20505,20506,20507,20508,20509,20510,20511,20512,20513,20514,20515,20516,20517,20518,20519,20520,20521,20522,20523,20524,20525,20526,20527,20528,20529,20530,20531,20532,20533,20534,20535,20536,20537,20538,20539,20540,20541,20542,20543,20544,20545,20546,20547,20548,20549,20550,20551,20552,20553,20554,20555,20556,20557,20558,20559,20560,20561,20562,20563,20564,20565,20566,20567,20568,20569,20570,20571,20572,20573,20574,20575,20576,20577,20578,20579,20580,20581,20582,20583,20584,20585,20586,20587,20588,20589,20590,20591,20592,20593,20594,20595,20596,20597,20598,20599,20600,20601,20602,20603,20604,20605,20606,20607,20608,20609,20610,20611,20612,20613,20614,20615,20616,20617,20618,20619,20620,20621,20622,20623,20624,20625,20626,20627,20628,20629,20630,20631,20632,20633,20634,20635,20636,20637,20638,20639,20640,20641,20642,20643,20644,20645,20646,20647,20648,20649,20650,20651,20652,20653,20654,20655,20656,20657,20658,20659,20660,20661,20662,20663,20664,20665,20666,20667,20668,20669,20670,20671,20672,20673,20674,20675,20676,20677,20678,20679,20680,20681,20682,20683,20684,20685,20686,20687,20688,20689,20690,20691,20692,20693,20694,20695,20696,20697,20698,20699,20700,20701,20702,20703,20704,20705,20706,20707,20708,20709,20710,20711,20712,20713,20714,20715,20716,20717,20718,20719,20720,20721,20722,20723,20724,20725,20726,20727,20728,20729,20730,20731,20732,20733,20734,20735,20736,20737,20738,20739,20740,20741,20742,20743,20744,20745,20746,20747,20748,20749,20750,20751,20752,20753,20754,20755,20756,20757,20758,20759,20760,20761,20762,20763,20764,20765,20766,20767,20768,20769,20770,20771,20772,20773,20774,20775,20776,20777,20778,20779,20780,20781,20782,20783,20784,20785,20786,20787,20788,20789,20790,20791,20792,20793,20794,20795,20796,20797,20798,20799,20800,20801,20802,20803,20804,20805,20806,20807,20808,20809,20810,20811,20812,20813,20814,20815,20816,20817,20818,20819,20820,20821,20822,20823,20824,20825,20826,20827,20828,20829,20830,20831,20832,20833,20834,20835,20836,20837,20838,20839,20840,20841,20842,20843,20844,20845,20846,20847,20848,20849,20850,20851,20852,20853,20854,20855,20856,20857,20858,20859,20860,20861,20862,20863,20864,20865,20866,20867,20868,20869,20870,20871,20872,20873,20874,20875,20876,20877,20878,20879,20880,20881,20882,20883,20884,20885,20886,20887,20888,20889,20890,20891,20892,20893,20894,20895,20896,20897,20898,20899,20900,20901,20902,20903,20904,20905,20906,20907,20908,20909,20910,20911,20912,20913,20914,20915,20916,20917,20918,20919,20920,20921,20922,20923,20924,20925,20926,20927,20928,20929,20930,20931,20932,20933,20934,20935,20936,20937,20938,20939,20940,20941,20942,20943,20944,20945,20946,20947,20948,20949,20950,20951,20952,20953,20954,20955,20956,20957,20958,20959,20960,20961,20962,20963,20964,20965,20966,20967,20968,20969,20970,20971,20972,20973,20974,20975,20976,20977,20978,20979,20980,20981,20982,20983,20984,20985,20986,20987,20988,20989,20990,20991,20992,20993,20994,20995,20996,20997,20998,20999,21000,21001,21002,21003,21004,21005,21006,21007,21008,21009,21010,21011,21012,21013,21014,21015,21016,21017,21018,21019,21020,21021,21022,21023,21024,21025,21026,21027,21028,21029,21030,21031,21032,21033,21034,21035,21036,21037,21038,21039,21040,21041,21042,21043,21044,21045,21046,21047,21048,21049,21050,21051,21052,21053,21054,21055,21056,21057,21058,21059,21060,21061,21062,21063,21064,21065,21066,21067,21068,21069,21070,21071,21072,21073,21074,21075,21076,21077,21078,21079,21080,21081,21082,21083,21084,21085,21086,21087,21088,21089,21090,21091,21092,21093,21094,21095,21096,21097,21098,21099,21100,21101,21102,21103,21104,21105,21106,21107,21108,21109,21110,21111,21112,21113,21114,21115,21116,21117,21118,21119,21120,21121,21122,21123,21124,21125,21126,21127,21128,21129,21130,21131,21132,21133,21134,21135,21136,21137,21138,21139,21140,21141,21142,21143,21144,21145,21146,21147,21148,21149,21150,21151,21152,21153,21154,21155,21156,21157,21158,21159,21160,21161,21162,21163,21164,21165,21166,21167,21168,21169,21170,21171,21172,21173,21174,21175,21176,21177,21178,21179,21180,21181,21182,21183,21184,21185,21186,21187,21188,21189,21190,21191,21192,21193,21194,21195,21196,21197,21198,21199,21200,21201,21202,21203,21204,21205,21206,21207,21208,21209,21210,21211,21212,21213,21214,21215,21216,21217,21218,21219,21220,21221,21222,21223,21224,21225,21226,21227,21228,21229,21230,21231,21232,21233,21234,21235,21236,21237,21238,21239,21240,21241,21242,21243,21244,21245,21246,21247,21248,21249,21250,21251,21252,21253,21254,21255,21256,21257,21258,21259,21260,21261,21262,21263,21264,21265,21266,21267,21268,21269,21270,21271,21272,21273,21274,21275,21276,21277,21278,21279,21280,21281,21282,21283,21284,21285,21286,21287,21288,21289,21290,21291,21292,21293,21294,21295,21296,21297,21298,21299,21300,21301,21302,21303,21304,21305,21306,21307,21308,21309,21310,21311,21312,21313,21314,21315,21316,21317,21318,21319,21320,21321,21322,21323,21324,21325,21326,21327,21328,21329,21330,21331,21332,21333,21334,21335,21336,21337,21338,21339,21340,21341,21342,21343,21344,21345,21346,21347,21348,21349,21350,21351,21352,21353,21354,21355,21356,21357,21358,21359,21360,21361,21362,21363,21364,21365,21366,21367,21368,21369,21370,21371,21372,21373,21374,21375,21376,21377,21378,21379,21380,21381,21382,21383,21384,21385,21386,21387,21388,21389,21390,21391,21392,21393,21394,21395,21396,21397,21398,21399,21400,21401,21402,21403,21404,21405,21406,21407,21408,21409,21410,21411,21412,21413,21414,21415,21416,21417,21418,21419,21420,21421,21422,21423,21424,21425,21426,21427,21428,21429,21430,21431,21432,21433,21434,21435,21436,21437,21438,21439,21440,21441,21442,21443,21444,21445,21446,21447,21448,21449,21450,21451,21452,21453,21454,21455,21456,21457,21458,21459,21460,21461,21462,21463,21464,21465,21466,21467,21468,21469,21470,21471,21472,21473,21474,21475,21476,21477,21478,21479,21480,21481,21482,21483,21484,21485,21486,21487,21488,21489,21490,21491,21492,21493,21494,21495,21496,21497,21498,21499,21500,21501,21502,21503,21504,21505,21506,21507,21508,21509,21510,21511,21512,21513,21514,21515,21516,21517,21518,21519,21520,21521,21522,21523,21524,21525,21526,21527,21528,21529,21530,21531,21532,21533,21534,21535,21536,21537,21538,21539,21540,21541,21542,21543,21544,21545,21546,21547,21548,21549,21550,21551,21552,21553,21554,21555,21556,21557,21558,21559,21560,21561,21562,21563,21564,21565,21566,21567,21568,21569,21570,21571,21572,21573,21574,21575,21576,21577,21578,21579,21580,21581,21582,21583,21584,21585,21586,21587,21588,21589,21590,21591,21592,21593,21594,21595,21596,21597,21598,21599,21600,21601,21602,21603,21604,21605,21606,21607,21608,21609,21610,21611,21612,21613,21614,21615,21616,21617,21618,21619,21620,21621,21622,21623,21624,21625,21626,21627,21628,21629,21630,21631,21632,21633,21634,21635,21636,21637,21638,21639,21640,21641,21642,21643,21644,21645,21646,21647,21648,21649,21650,21651,21652,21653,21654,21655,21656,21657,21658,21659,21660,21661,21662,21663,21664,21665,21666,21667,21668,21669,21670,21671,21672,21673,21674,21675,21676,21677,21678,21679,21680,21681,21682,21683,21684,21685,21686,21687,21688,21689,21690,21691,21692,21693,21694,21695,21696,21697,21698,21699,21700,21701,21702,21703,21704,21705,21706,21707,21708,21709,21710,21711,21712,21713,21714,21715,21716,21717,21718,21719,21720,21721,21722,21723,21724,21725,21726,21727,21728,21729,21730,21731,21732,21733,21734,21735,21736,21737,21738,21739,21740,21741,21742,21743,21744,21745,21746,21747,21748,21749,21750,21751,21752,21753,21754,21755,21756,21757,21758,21759,21760,21761,21762,21763,21764,21765,21766,21767,21768,21769,21770,21771,21772,21773,21774,21775,21776,21777,21778,21779,21780,21781,21782,21783,21784,21785,21786,21787,21788,21789,21790,21791,21792,21793,21794,21795,21796,21797,21798,21799,21800,21801,21802,21803,21804,21805,21806,21807,21808,21809,21810,21811,21812,21813,21814,21815,21816,21817,21818,21819,21820,21821,21822,21823,21824,21825,21826,21827,21828,21829,21830,21831,21832,21833,21834,21835,21836,21837,21838,21839,21840,21841,21842,21843,21844,21845,21846,21847,21848,21849,21850,21851,21852,21853,21854,21855,21856,21857,21858,21859,21860,21861,21862,21863,21864,21865,21866,21867,21868,21869,21870,21871,21872,21873,21874,21875,21876,21877,21878,21879,21880,21881,21882,21883,21884,21885,21886,21887,21888,21889,21890,21891,21892,21893,21894,21895,21896,21897,21898,21899,21900,21901,21902,21903,21904,21905,21906,21907,21908,21909,21910,21911,21912,21913,21914,21915,21916,21917,21918,21919,21920,21921,21922,21923,21924,21925,21926,21927,21928,21929,21930,21931,21932,21933,21934,21935,21936,21937,21938,21939,21940,21941,21942,21943,21944,21945,21946,21947,21948,21949,21950,21951,21952,21953,21954,21955,21956,21957,21958,21959,21960,21961,21962,21963,21964,21965,21966,21967,21968,21969,21970,21971,21972,21973,21974,21975,21976,21977,21978,21979,21980,21981,21982,21983,21984,21985,21986,21987,21988,21989,21990,21991,21992,21993,21994,21995,21996,21997,21998,21999,22000,22001,22002,22003,22004,22005,22006,22007,22008,22009,22010,22011,22012,22013,22014,22015,22016,22017,22018,22019,22020,22021,22022,22023,22024,22025,22026,22027,22028,22029,22030,22031,22032,22033,22034,22035,22036,22037,22038,22039,22040,22041,22042,22043,22044,22045,22046,22047,22048,22049,22050,22051,22052,22053,22054,22055,22056,22057,22058,22059,22060,22061,22062,22063,22064,22065,22066,22067,22068,22069,22070,22071,22072,22073,22074,22075,22076,22077,22078,22079,22080,22081,22082,22083,22084,22085,22086,22087,22088,22089,22090,22091,22092,22093,22094,22095,22096,22097,22098,22099,22100,22101,22102,22103,22104,22105,22106,22107,22108,22109,22110,22111,22112,22113,22114,22115,22116,22117,22118,22119,22120,22121,22122,22123,22124,22125,22126,22127,22128,22129,22130,22131,22132,22133,22134,22135,22136,22137,22138,22139,22140,22141,22142,22143,22144,22145,22146,22147,22148,22149,22150,22151,22152,22153,22154,22155,22156,22157,22158,22159,22160,22161,22162,22163,22164,22165,22166,22167,22168,22169,22170,22171,22172,22173,22174,22175,22176,22177,22178,22179,22180,22181,22182,22183,22184,22185,22186,22187,22188,22189,22190,22191,22192,22193,22194,22195,22196,22197,22198,22199,22200,22201,22202,22203,22204,22205,22206,22207,22208,22209,22210,22211,22212,22213,22214,22215,22216,22217,22218,22219,22220,22221,22222,22223,22224,22225,22226,22227,22228,22229,22230,22231,22232,22233,22234,22235,22236,22237,22238,22239,22240,22241,22242,22243,22244,22245,22246,22247,22248,22249,22250,22251,22252,22253,22254,22255,22256,22257,22258,22259,22260,22261,22262,22263,22264,22265,22266,22267,22268,22269,22270,22271,22272,22273,22274,22275,22276,22277,22278,22279,22280,22281,22282,22283,22284,22285,22286,22287,22288,22289,22290,22291,22292,22293,22294,22295,22296,22297,22298,22299,22300,22301,22302,22303,22304,22305,22306,22307,22308,22309,22310,22311,22312,22313,22314,22315,22316,22317,22318,22319,22320,22321,22322,22323,22324,22325,22326,22327,22328,22329,22330,22331,22332,22333,22334,22335,22336,22337,22338,22339,22340,22341,22342,22343,22344,22345,22346,22347,22348,22349,22350,22351,22352,22353,22354,22355,22356,22357,22358,22359,22360,22361,22362,22363,22364,22365,22366,22367,22368,22369,22370,22371,22372,22373,22374,22375,22376,22377,22378,22379,22380,22381,22382,22383,22384,22385,22386,22387,22388,22389,22390,22391,22392,22393,22394,22395,22396,22397,22398,22399,22400,22401,22402,22403,22404,22405,22406,22407,22408,22409,22410,22411,22412,22413,22414,22415,22416,22417,22418,22419,22420,22421,22422,22423,22424,22425,22426,22427,22428,22429,22430,22431,22432,22433,22434,22435,22436,22437,22438,22439,22440,22441,22442,22443,22444,22445,22446,22447,22448,22449,22450,22451,22452,22453,22454,22455,22456,22457,22458,22459,22460,22461,22462,22463,22464,22465,22466,22467,22468,22469,22470,22471,22472,22473,22474,22475,22476,22477,22478,22479,22480,22481,22482,22483,22484,22485,22486,22487,22488,22489,22490,22491,22492,22493,22494,22495,22496,22497,22498,22499,22500,22501,22502,22503,22504,22505,22506,22507,22508,22509,22510,22511,22512,22513,22514,22515,22516,22517,22518,22519,22520,22521,22522,22523,22524,22525,22526,22527,22528,22529,22530,22531,22532,22533,22534,22535,22536,22537,22538,22539,22540,22541,22542,22543,22544,22545,22546,22547,22548,22549,22550,22551,22552,22553,22554,22555,22556,22557,22558,22559,22560,22561,22562,22563,22564,22565,22566,22567,22568,22569,22570,22571,22572,22573,22574,22575,22576,22577,22578,22579,22580,22581,22582,22583,22584,22585,22586,22587,22588,22589,22590,22591,22592,22593,22594,22595,22596,22597,22598,22599,22600,22601,22602,22603,22604,22605,22606,22607,22608,22609,22610,22611,22612,22613,22614,22615,22616,22617,22618,22619,22620,22621,22622,22623,22624,22625,22626,22627,22628,22629,22630,22631,22632,22633,22634,22635,22636,22637,22638,22639,22640,22641,22642,22643,22644,22645,22646,22647,22648,22649,22650,22651,22652,22653,22654,22655,22656,22657,22658,22659,22660,22661,22662,22663,22664,22665,22666,22667,22668,22669,22670,22671,22672,22673,22674,22675,22676,22677,22678,22679,22680,22681,22682,22683,22684,22685,22686,22687,22688,22689,22690,22691,22692,22693,22694,22695,22696,22697,22698,22699,22700,22701,22702,22703,22704,22705,22706,22707,22708,22709,22710,22711,22712,22713,22714,22715,22716,22717,22718,22719,22720,22721,22722,22723,22724,22725,22726,22727,22728,22729,22730,22731,22732,22733,22734,22735,22736,22737,22738,22739,22740,22741,22742,22743,22744,22745,22746,22747,22748,22749,22750,22751,22752,22753,22754,22755,22756,22757,22758,22759,22760,22761,22762,22763,22764,22765,22766,22767,22768,22769,22770,22771,22772,22773,22774,22775,22776,22777,22778,22779,22780,22781,22782,22783,22784,22785,22786,22787,22788,22789,22790,22791,22792,22793,22794,22795,22796,22797,22798,22799,22800,22801,22802,22803,22804,22805,22806,22807,22808,22809,22810,22811,22812,22813,22814,22815,22816,22817,22818,22819,22820,22821,22822,22823,22824,22825,22826,22827,22828,22829,22830,22831,22832,22833,22834,22835,22836,22837,22838,22839,22840,22841,22842,22843,22844,22845,22846,22847,22848,22849,22850,22851,22852,22853,22854,22855,22856,22857,22858,22859,22860,22861,22862,22863,22864,22865,22866,22867,22868,22869,22870,22871,22872,22873,22874,22875,22876,22877,22878,22879,22880,22881,22882,22883,22884,22885,22886,22887,22888,22889,22890,22891,22892,22893,22894,22895,22896,22897,22898,22899,22900,22901,22902,22903,22904,22905,22906,22907,22908,22909,22910,22911,22912,22913,22914,22915,22916,22917,22918,22919,22920,22921,22922,22923,22924,22925,22926,22927,22928,22929,22930,22931,22932,22933,22934,22935,22936,22937,22938,22939,22940,22941,22942,22943,22944,22945,22946,22947,22948,22949,22950,22951,22952,22953,22954,22955,22956,22957,22958,22959,22960,22961,22962,22963,22964,22965,22966,22967,22968,22969,22970,22971,22972,22973,22974,22975,22976,22977,22978,22979,22980,22981,22982,22983,22984,22985,22986,22987,22988,22989,22990,22991,22992,22993,22994,22995,22996,22997,22998,22999,23000,23001,23002,23003,23004,23005,23006,23007,23008,23009,23010,23011,23012,23013,23014,23015,23016,23017,23018,23019,23020,23021,23022,23023,23024,23025,23026,23027,23028,23029,23030,23031,23032,23033,23034,23035,23036,23037,23038,23039,23040,23041,23042,23043,23044,23045,23046,23047,23048,23049,23050,23051,23052,23053,23054,23055,23056,23057,23058,23059,23060,23061,23062,23063,23064,23065,23066,23067,23068,23069,23070,23071,23072,23073,23074,23075,23076,23077,23078,23079,23080,23081,23082,23083,23084,23085,23086,23087,23088,23089,23090,23091,23092,23093,23094,23095,23096,23097,23098,23099,23100,23101,23102,23103,23104,23105,23106,23107,23108,23109,23110,23111,23112,23113,23114,23115,23116,23117,23118,23119,23120,23121,23122,23123,23124,23125,23126,23127,23128,23129,23130,23131,23132,23133,23134,23135,23136,23137,23138,23139,23140,23141,23142,23143,23144,23145,23146,23147,23148,23149,23150,23151,23152,23153,23154,23155,23156,23157,23158,23159,23160,23161,23162,23163,23164,23165,23166,23167,23168,23169,23170,23171,23172,23173,23174,23175,23176,23177,23178,23179,23180,23181,23182,23183,23184,23185,23186,23187,23188,23189,23190,23191,23192,23193,23194,23195,23196,23197,23198,23199,23200,23201,23202,23203,23204,23205,23206,23207,23208,23209,23210,23211,23212,23213,23214,23215,23216,23217,23218,23219,23220,23221,23222,23223,23224,23225,23226,23227,23228,23229,23230,23231,23232,23233,23234,23235,23236,23237,23238,23239,23240,23241,23242,23243,23244,23245,23246,23247,23248,23249,23250,23251,23252,23253,23254,23255,23256,23257,23258,23259,23260,23261,23262,23263,23264,23265,23266,23267,23268,23269,23270,23271,23272,23273,23274,23275,23276,23277,23278,23279,23280,23281,23282,23283,23284,23285,23286,23287,23288,23289,23290,23291,23292,23293,23294,23295,23296,23297,23298,23299,23300,23301,23302,23303,23304,23305,23306,23307,23308,23309,23310,23311,23312,23313,23314,23315,23316,23317,23318,23319,23320,23321,23322,23323,23324,23325,23326,23327,23328,23329,23330,23331,23332,23333,23334,23335,23336,23337,23338,23339,23340,23341,23342,23343,23344,23345,23346,23347,23348,23349,23350,23351,23352,23353,23354,23355,23356,23357,23358,23359,23360,23361,23362,23363,23364,23365,23366,23367,23368,23369,23370,23371,23372,23373,23374,23375,23376,23377,23378,23379,23380,23381,23382,23383,23384,23385,23386,23387,23388,23389,23390,23391,23392,23393,23394,23395,23396,23397,23398,23399,23400,23401,23402,23403,23404,23405,23406,23407,23408,23409,23410,23411,23412,23413,23414,23415,23416,23417,23418,23419,23420,23421,23422,23423,23424,23425,23426,23427,23428,23429,23430,23431,23432,23433,23434,23435,23436,23437,23438,23439,23440,23441,23442,23443,23444,23445,23446,23447,23448,23449,23450,23451,23452,23453,23454,23455,23456,23457,23458,23459,23460,23461,23462,23463,23464,23465,23466,23467,23468,23469,23470,23471,23472,23473,23474,23475,23476,23477,23478,23479,23480,23481,23482,23483,23484,23485,23486,23487,23488,23489,23490,23491,23492,23493,23494,23495,23496,23497,23498,23499,23500,23501,23502,23503,23504,23505,23506,23507,23508,23509,23510,23511,23512,23513,23514,23515,23516,23517,23518,23519,23520,23521,23522,23523,23524,23525,23526,23527,23528,23529,23530,23531,23532,23533,23534,23535,23536,23537,23538,23539,23540,23541,23542,23543,23544,23545,23546,23547,23548,23549,23550,23551,23552,23553,23554,23555,23556,23557,23558,23559,23560,23561,23562,23563,23564,23565,23566,23567,23568,23569,23570,23571,23572,23573,23574,23575,23576,23577,23578,23579,23580,23581,23582,23583,23584,23585,23586,23587,23588,23589,23590,23591,23592,23593,23594,23595,23596,23597,23598,23599,23600,23601,23602,23603,23604,23605,23606,23607,23608,23609,23610,23611,23612,23613,23614,23615,23616,23617,23618,23619,23620,23621,23622,23623,23624,23625,23626,23627,23628,23629,23630,23631,23632,23633,23634,23635,23636,23637,23638,23639,23640,23641,23642,23643,23644,23645,23646,23647,23648,23649,23650,23651,23652,23653,23654,23655,23656,23657,23658,23659,23660,23661,23662,23663,23664,23665,23666,23667,23668,23669,23670,23671,23672,23673,23674,23675,23676,23677,23678,23679,23680,23681,23682,23683,23684,23685,23686,23687,23688,23689,23690,23691,23692,23693,23694,23695,23696,23697,23698,23699,23700,23701,23702,23703,23704,23705,23706,23707,23708,23709,23710,23711,23712,23713,23714,23715,23716,23717,23718,23719,23720,23721,23722,23723,23724,23725,23726,23727,23728,23729,23730,23731,23732,23733,23734,23735,23736,23737,23738,23739,23740,23741,23742,23743,23744,23745,23746,23747,23748,23749,23750,23751,23752,23753,23754,23755,23756,23757,23758,23759,23760,23761,23762,23763,23764,23765,23766,23767,23768,23769,23770,23771,23772,23773,23774,23775,23776,23777,23778,23779,23780,23781,23782,23783,23784,23785,23786,23787,23788,23789,23790,23791,23792,23793,23794,23795,23796,23797,23798,23799,23800,23801,23802,23803,23804,23805,23806,23807,23808,23809,23810,23811,23812,23813,23814,23815,23816,23817,23818,23819,23820,23821,23822,23823,23824,23825,23826,23827,23828,23829,23830,23831,23832,23833,23834,23835,23836,23837,23838,23839,23840,23841,23842,23843,23844,23845,23846,23847,23848,23849,23850,23851,23852,23853,23854,23855,23856,23857,23858,23859,23860,23861,23862,23863,23864,23865,23866,23867,23868,23869,23870,23871,23872,23873,23874,23875,23876,23877,23878,23879,23880,23881,23882,23883,23884,23885,23886,23887,23888,23889,23890,23891,23892,23893,23894,23895,23896,23897,23898,23899,23900,23901,23902,23903,23904,23905,23906,23907,23908,23909,23910,23911,23912,23913,23914,23915,23916,23917,23918,23919,23920,23921,23922,23923,23924,23925,23926,23927,23928,23929,23930,23931,23932,23933,23934,23935,23936,23937,23938,23939,23940,23941,23942,23943,23944,23945,23946,23947,23948,23949,23950,23951,23952,23953,23954,23955,23956,23957,23958,23959,23960,23961,23962,23963,23964,23965,23966,23967,23968,23969,23970,23971,23972,23973,23974,23975,23976,23977,23978,23979,23980,23981,23982,23983,23984,23985,23986,23987,23988,23989,23990,23991,23992,23993,23994,23995,23996,23997,23998,23999,24000,24001,24002,24003,24004,24005,24006,24007,24008,24009,24010,24011,24012,24013,24014,24015,24016,24017,24018,24019,24020,24021,24022,24023,24024,24025,24026,24027,24028,24029,24030,24031,24032,24033,24034,24035,24036,24037,24038,24039,24040,24041,24042,24043,24044,24045,24046,24047,24048,24049,24050,24051,24052,24053,24054,24055,24056,24057,24058,24059,24060,24061,24062,24063,24064,24065,24066,24067,24068,24069,24070,24071,24072,24073,24074,24075,24076,24077,24078,24079,24080,24081,24082,24083,24084,24085,24086,24087,24088,24089,24090,24091,24092,24093,24094,24095,24096,24097,24098,24099,24100,24101,24102,24103,24104,24105,24106,24107,24108,24109,24110,24111,24112,24113,24114,24115,24116,24117,24118,24119,24120,24121,24122,24123,24124,24125,24126,24127,24128,24129,24130,24131,24132,24133,24134,24135,24136,24137,24138,24139,24140,24141,24142,24143,24144,24145,24146,24147,24148,24149,24150,24151,24152,24153,24154,24155,24156,24157,24158,24159,24160,24161,24162,24163,24164,24165,24166,24167,24168,24169,24170,24171,24172,24173,24174,24175,24176,24177,24178,24179,24180,24181,24182,24183,24184,24185,24186,24187,24188,24189,24190,24191,24192,24193,24194,24195,24196,24197,24198,24199,24200,24201,24202,24203,24204,24205,24206,24207,24208,24209,24210,24211,24212,24213,24214,24215,24216,24217,24218,24219,24220,24221,24222,24223,24224,24225,24226,24227,24228,24229,24230,24231,24232,24233,24234,24235,24236,24237,24238,24239,24240,24241,24242,24243,24244,24245,24246,24247,24248,24249,24250,24251,24252,24253,24254,24255,24256,24257,24258,24259,24260,24261,24262,24263,24264,24265,24266,24267,24268,24269,24270,24271,24272,24273,24274,24275,24276,24277,24278,24279,24280,24281,24282,24283,24284,24285,24286,24287,24288,24289,24290,24291,24292,24293,24294,24295,24296,24297,24298,24299,24300,24301,24302,24303,24304,24305,24306,24307,24308,24309,24310,24311,24312,24313,24314,24315,24316,24317,24318,24319,24320,24321,24322,24323,24324,24325,24326,24327,24328,24329,24330,24331,24332,24333,24334,24335,24336,24337,24338,24339,24340,24341,24342,24343,24344,24345,24346,24347,24348,24349,24350,24351,24352,24353,24354,24355,24356,24357,24358,24359,24360,24361,24362,24363,24364,24365,24366,24367,24368,24369,24370,24371,24372,24373,24374,24375,24376,24377,24378,24379,24380,24381,24382,24383,24384,24385,24386,24387,24388,24389,24390,24391,24392,24393,24394,24395,24396,24397,24398,24399,24400,24401,24402,24403,24404,24405,24406,24407,24408,24409,24410,24411,24412,24413,24414,24415,24416,24417,24418,24419,24420,24421,24422,24423,24424,24425,24426,24427,24428,24429,24430,24431,24432,24433,24434,24435,24436,24437,24438,24439,24440,24441,24442,24443,24444,24445,24446,24447,24448,24449,24450,24451,24452,24453,24454,24455,24456,24457,24458,24459,24460,24461,24462,24463,24464,24465,24466,24467,24468,24469,24470,24471,24472,24473,24474,24475,24476,24477,24478,24479,24480,24481,24482,24483,24484,24485,24486,24487,24488,24489,24490,24491,24492,24493,24494,24495,24496,24497,24498,24499,24500,24501,24502,24503,24504,24505,24506,24507,24508,24509,24510,24511,24512,24513,24514,24515,24516,24517,24518,24519,24520,24521,24522,24523,24524,24525,24526,24527,24528,24529,24530,24531,24532,24533,24534,24535,24536,24537,24538,24539,24540,24541,24542,24543,24544,24545,24546,24547,24548,24549,24550,24551,24552,24553,24554,24555,24556,24557,24558,24559,24560,24561,24562,24563,24564,24565,24566,24567,24568,24569,24570,24571,24572,24573,24574,24575,24576,24577,24578,24579,24580,24581,24582,24583,24584,24585,24586,24587,24588,24589,24590,24591,24592,24593,24594,24595,24596,24597,24598,24599,24600,24601,24602,24603,24604,24605,24606,24607,24608,24609,24610,24611,24612,24613,24614,24615,24616,24617,24618,24619,24620,24621,24622,24623,24624,24625,24626,24627,24628,24629,24630,24631,24632,24633,24634,24635,24636,24637,24638,24639,24640,24641,24642,24643,24644,24645,24646,24647,24648,24649,24650,24651,24652,24653,24654,24655,24656,24657,24658,24659,24660,24661,24662,24663,24664,24665,24666,24667,24668,24669,24670,24671,24672,24673,24674,24675,24676,24677,24678,24679,24680,24681,24682,24683,24684,24685,24686,24687,24688,24689,24690,24691,24692,24693,24694,24695,24696,24697,24698,24699,24700,24701,24702,24703,24704,24705,24706,24707,24708,24709,24710,24711,24712,24713,24714,24715,24716,24717,24718,24719,24720,24721,24722,24723,24724,24725,24726,24727,24728,24729,24730,24731,24732,24733,24734,24735,24736,24737,24738,24739,24740,24741,24742,24743,24744,24745,24746,24747,24748,24749,24750,24751,24752,24753,24754,24755,24756,24757,24758,24759,24760,24761,24762,24763,24764,24765,24766,24767,24768,24769,24770,24771,24772,24773,24774,24775,24776,24777,24778,24779,24780,24781,24782,24783,24784,24785,24786,24787,24788,24789,24790,24791,24792,24793,24794,24795,24796,24797,24798,24799,24800,24801,24802,24803,24804,24805,24806,24807,24808,24809,24810,24811,24812,24813,24814,24815,24816,24817,24819,24820,24821,24822,24823,24824,24825,24826,24827,24828,24829,24830,24831,24832,24833,24834,24835,24836,24837,24838,24839,24840,24841,24842,24843,24844,24845,24846,24847,24848,24849,24850,24851,24852,24853,24854,24855,24856,24857,24858,24859,24860,24861,24862,24863,24864,24865,24866,24867,24868,24869,24870,24871,24872,24873,24874,24875,24876,24877,24878,24879,24880,24881,24882,24883,24884,24885,24886,24887,24888,24889,24890,24891,24892,24893,24894,24895,24896,24897,24898,24899,24900,24901,24902,24903,24904,24905,24906,24907,24908,24909,24910,24911,24912,24913,24914,24915,24916,24917,24918,24919,24920,24921,24922,24923,24924,24925,24926,24927,24928,24929,24930,24931,24932,24933,24934,24935,24936,24937,24938,24939,24940,24941,24942,24943,24944,24945,24946,24947,24948,24949,24950,24951,24952,24953,24954,24955,24956,24957,24958,24959,24960,24961,24962,24963,24964,24965,24966,24967,24968,24969,24970,24971,24972,24973,24974,24975,24976,24977,24978,24979,24980,24981,24982,24983,24984,24985,24986,24987,24988,24989,24990,24991,24992,24993,24994,24995,24996,24997,24998,24999,25000,25001,25002,25003,25004,25005,25006,25007,25008,25009,25010,25011,25012,25013,25014,25015,25016,25017,25018,25019,25020,25021,25022,25023,25024,25025,25026,25027,25028,25029,25030,25031,25032,25033,25034,25035,25036,25037,25038,25039,25040,25041,25042,25043,25044,25045,25046,25047,25048,25049,25050,25051,25052,25053,25054,25055,25056,25057,25058,25059,25060,25061,25062,25063,25064,25065,25066,25067,25068,25069,25070,25071,25072,25073,25074,25075,25076,25077,25078,25079,25080,25081,25082,25083,25084,25085,25086,25087,25088,25089,25090,25091,25092,25093,25094,25095,25096,25097,25098,25099,25100,25101,25102,25103,25104,25105,25106,25107,25108,25109,25110,25111,25112,25113,25114,25115,25116,25117,25118,25119,25120,25121,25122,25123,25124,25125,25126,25127,25128,25129,25130,25131,25132,25133,25134,25135,25136,25137,25138,25139,25140,25141,25142,25143,25144,25145,25146,25147,25148,25149,25150,25151,25152,25153,25154,25155,25156,25157,25158,25159,25160,25161,25162,25163,25164,25165,25166,25167,25168,25169,25170,25171,25172,25173,25174,25175,25176,25177,25178,25179,25180,25181,25182,25183,25184,25185,25186,25187,25188,25189,25190,25191,25192,25193,25194,25195,25196,25197,25198,25199,25200,25201,25202,25203,25204,25205,25206,25207,25208,25209,25210,25211,25212,25213,25214,25215,25216,25217,25218,25219,25220,25221,25222,25223,25224,25225,25226,25227,25228,25229,25230,25231,25232,25233,25234,25235,25236,25237,25238,25239,25240,25241,25242,25243,25244,25245,25246,25247,25248,25249,25250,25251,25252,25253,25254,25255,25256,25257,25258,25259,25260,25261,25262,25263,25264,25265,25266,25267,25268,25269,25270,25271,25272,25273,25274,25275,25276,25277,25278,25279,25280,25281,25282,25283,25284,25285,25286,25287,25288,25289,25290,25291,25292,25293,25294,25295,25296,25297,25298,25299,25300,25301,25302,25303,25304,25305,25306,25307,25308,25309,25310,25311,25312,25313,25314,25315,25316,25317,25318,25319,25320,25321,25322,25323,25324,25325,25326,25327,25328,25329,25330,25331,25332,25333,25334,25335,25336,25337,25338,25339,25340,25341,25342,25343,25344,25345,25346,25347,25348,25349,25350,25351,25352,25353,25354,25355,25356,25357,25358,25359,25360,25361,25362,25363,25364,25365,25366,25367,25368,25369,25370,25371,25372,25373,25374,25375,25376,25377,25378,25379,25380,25381,25382,25383,25384,25385,25386,25387,25388,25389,25390,25391,25392,25393,25394,25395,25396,25397,25398,25399,25400,25401,25402,25403,25404,25405,25406,25407,25408,25409,25410,25411,25412,25413,25414,25415,25416,25417,25418,25419,25420,25421,25422,25423,25424,25425,25426,25427,25428,25429,25430,25431,25432,25433,25434,25435,25436,25437,25438,25439,25440,25441,25442,25443,25444,25445,25446,25447,25448,25449,25450,25451,25452,25453,25454,25455,25456,25457,25458,25459,25460,25461,25462,25463,25464,25465,25466,25467,25468,25469,25470,25471,25472,25473,25474,25475,25476,25477,25478,25479,25480,25481,25482,25483,25484,25485,25486,25487,25488,25489,25490,25491,25492,25493,25494,25495,25496,25497,25498,25499,25500,25501,25502,25503,25504,25505,25506,25507,25508,25509,25510,25511,25512,25513,25514,25515,25516,25517,25518,25519,25520,25521,25522,25523,25524,25525,25526,25527,25528,25529,25530,25531,25532,25533,25534,25535,25536,25537,25538,25539,25540,25541,25542,25543,25544,25545,25546,25547,25548,25549,25550,25551,25552,25553,25554,25555,25556,25557,25558,25559,25560,25561,25562,25563,25564,25565,25566,25567,25568,25569,25570,25571,25572,25573,25574,25575,25576,25577,25578,25579,25580,25581,25582,25583,25584,25585,25586,25587,25588,25589,25590,25591,25592,25593,25594,25595,25596,25597,25598,25599,25600,25601,25602,25603,25604,25605,25606,25607,25608,25609,25610,25611,25612,25613,25614,25615,25616,25617,25618,25619,25620,25621,25622,25623,25624,25625,25626,25627,25628,25629,25630,25631,25632,25633,25634,25635,25636,25637,25638,25639,25640,25641,25642,25643,25644,25645,25646,25647,25648,25649,25650,25651,25652,25653,25654,25655,25656,25657,25658,25659,25660,25661,25662,25663,25664,25665,25666,25667,25668,25669,25670,25671,25672,25673,25674,25675,25676,25677,25678,25679,25680,25681,25682,25683,25684,25685,25686,25687,25688,25689,25690,25691,25692,25693,25694,25695,25696,25697,25698,25699,25700,25701,25702,25703,25704,25705,25706,25707,25708,25709,25710,25711,25712,25713,25714,25715,25716,25717,25718,25719,25720,25721,25722,25723,25724,25725,25726,25727,25728,25729,25730,25731,25732,25733,25734,25735,25736,25737,25738,25739,25740,25741,25742,25743,25744,25745,25746,25747,25748,25749,25750,25751,25752,25753,25754,25755,25756,25757,25758,25759,25760,25761,25762,25763,25764,25765,25766,25767,25768,25769,25770,25771,25772,25774,25775,25776,25777,25778,25779,25780,25781,25782,25783,25784,25785,25786,25787,25788,25789,25790,25791,25792,25793,25794,25795,25796,25797,25798,25799,25800,25801,25802,25803,25804,25805,25806,25807,25808,25809,25810,25811,25812,25813,25814,25815,25816,25817,25818,25819,25820,25821,25822,25823,25824,25825,25826,25827,25828,25829,25830,25831,25832,25833,25834,25835,25836,25837,25838,25839,25840,25841,25842,25843,25844,25845,25846,25847,25848,25849,25850,25851,25852,25853,25854,25855,25856,25857,25858,25859,25860,25861,25862,25863,25864,25865,25866,25867,25868,25869,25870,25871,25872,25873,25874,25875,25876,25877,25878,25879,25880,25881,25882,25883,25884,25885,25886,25887,25888,25889,25890,25891,25892,25893,25894,25895,25896,25897,25898,25899,25900,25901,25902,25903,25904,25905,25906,25907,25908,25909,25910,25911,25912,25913,25914,25915,25916,25917,25918,25919,25920,25921,25922,25923,25924,25925,25926,25927,25928,25929,25930,25931,25932,25933,25934,25935,25936,25937,25938,25939,25940,25941,25942,25943,25944,25945,25946,25947,25948,25949,25950,25951,25952,25953,25954,25955,25956,25957,25958,25959,25960,25961,25962,25963,25964,25965,25966,25967,25968,25969,25970,25971,25972,25973,25974,25975,25976,25977,25978,25979,25980,25981,25982,25983,25984,25985,25986,25987,25988,25989,25990,25991,25992,25993,25994,25995,25996,25997,25998,25999,26000,26001,26002,26003,26004,26005,26006,26007,26008,26009,26010,26011,26012,26013,26014,26015,26016,26017,26018,26019,26020,26021,26022,26023,26024,26025,26026,26027,26028,26029,26030,26031,26032,26033,26034,26035,26036,26037,26038,26039,26040,26041,26042,26043,26044,26045,26046,26047,26048,26049,26050,26051,26052,26053,26054,26055,26056,26057,26058,26059,26060,26061,26062,26063,26064,26065,26066,26067,26068,26069,26070,26071,26072,26073,26074,26075,26076,26077,26078,26079,26080,26081,26082,26083,26084,26085,26086,26087,26088,26089,26090,26091,26092,26093,26094,26095,26096,26097,26098,26099,26100,26101,26102,26103,26104,26105,26106,26107,26108,26109,26110,26111,26112,26113,26114,26115,26116,26117,26118,26119,26120,26121,26122,26123,26124,26125,26126,26127,26128,26129,26130,26131,26132,26133,26134,26135,26136,26137,26138,26139,26140,26141,26142,26143,26144,26145,26146,26147,26148,26149,26150,26151,26152,26153,26154,26155,26156,26157,26158,26159,26160,26161,26162,26163,26164,26165,26166,26167,26168,26169,26170,26171,26172,26173,26174,26175,26176,26177,26178,26179,26180,26181,26182,26183,26184,26185,26186,26187,26188,26189,26190,26191,26192,26193,26194,26195,26196,26197,26198,26199,26200,26201,26202,26203,26204,26205,26206,26207,26208,26209,26210,26211,26212,26213,26214,26215,26216,26217,26218,26219,26220,26221,26222,26223,26224,26225,26226,26227,26228,26229,26230,26231,26232,26233,26234,26235,26236,26237,26238,26239,26240,26241,26242,26243,26244,26245,26246,26247,26248,26249,26250,26251,26252,26253,26254,26255,26256,26257,26258,26259,26260,26261,26262,26263,26264,26265,26266,26267,26268,26269,26270,26271,26272,26273,26274,26275,26276,26277,26278,26279,26280,26281,26282,26283,26284,26285,26286,26287,26288,26289,26290,26291,26292,26293,26294,26295,26296,26297,26298,26299,26300,26301,26302,26303,26304,26305,26306,26307,26308,26309,26310,26311,26312,26313,26314,26315,26316,26317,26318,26319,26320,26321,26322,26323,26324,26325,26326,26327,26328,26329,26330,26331,26332,26333,26334,26335,26336,26337,26338,26339,26340,26341,26342,26343,26344,26345,26346,26347,26348,26349,26350,26351,26352,26353,26354,26355,26356,26357,26358,26359,26360,26361,26362,26363,26364,26365,26366,26367,26368,26369,26370,26371,26372,26373,26374,26375,26376,26377,26378,26379,26380,26381,26382,26383,26384,26385,26386,26387,26388,26389,26390,26391,26392,26393,26394,26395,26396,26397,26398,26399,26400,26401,26402,26403,26404,26405,26406,26407,26408,26409,26410,26411,26412,26413,26414,26415,26416,26417,26418,26419,26420,26421,26422,26423,26424,26425,26426,26427,26428,26429,26430,26431,26432,26433,26434,26435,26436,26437,26438,26439,26440,26441,26442,26443,26444,26445,26446,26447,26448,26449,26450,26451,26452,26453,26454,26455,26456,26457,26458,26459,26460,26461,26462,26463,26464,26465,26466,26467,26468,26469,26470,26471,26472,26473,26474,26475,26476,26477,26478,26479,26480,26481,26482,26483,26484,26485,26486,26487,26488,26489,26490,26491,26492,26493,26494,26495,26496,26497,26498,26499,26500,26501,26502,26503,26504,26505,26506,26507,26508,26509,26510,26511,26512,26513,26514,26515,26516,26517,26518,26519,26520,26521,26522,26523,26524,26525,26526,26527,26528,26529,26530,26531,26532,26533,26534,26535,26536,26537,26538,26539,26540,26541,26542,26543,26544,26545,26546,26547,26548,26549,26550,26551,26552,26553,26554,26555,26556,26557,26558,26559,26560,26561,26562,26563,26564,26565,26566,26567,26568,26569,26570,26571,26572,26573,26574,26575,26576,26577,26578,26579,26580,26581,26582,26583,26584,26585,26586,26587,26588,26589,26590,26591,26592,26593,26594,26595,26596,26597,26598,26599,26600,26601,26602,26603,26604,26605,26606,26607,26608,26609,26610,26611,26612,26613,26614,26615,26616,26617,26618,26619,26620,26621,26622,26623,26624,26625,26626,26627,26628,26629,26630,26631,26632,26633,26634,26635,26636,26637,26638,26639,26640,26641,26642,26643,26644,26645,26646,26647,26648,26649,26650,26651,26652,26653,26654,26655,26656,26657,26658,26659,26660,26661,26662,26663,26664,26665,26666,26667,26668,26669,26670,26671,26672,26673,26674,26675,26676,26677,26678,26679,26680,26681,26682,26683,26684,26685,26686,26687,26688,26689,26690,26691,26692,26693,26694,26695,26696,26697,26698,26699,26700,26701,26702,26703,26704,26705,26706,26707,26708,26709,26710,26711,26712,26713,26714,26715,26716,26717,26718,26719,26720,26721,26722,26723,26724,26725,26726,26727,26728,26729,26730,26731,26732,26733,26734,26735,26736,26737,26738,26739,26740,26741,26742,26743,26744,26745,26746,26747,26748,26749,26750,26751,26752,26753,26754,26755,26756,26757,26758,26759,26760,26761,26762,26763,26764,26765,26766,26767,26768,26769,26770,26771,26772,26773,26774,26775,26776,26777,26778,26779,26780,26781,26782,26783,26784,26785,26786,26787,26788,26789,26790,26791,26792,26793,26794,26795,26796,26797,26798,26799,26800,26801,26802,26803,26804,26805,26806,26807,26808,26809,26810,26811,26812,26813,26814,26815,26816,26817,26818,26819,26820,26821,26822,26823,26824,26825,26826,26827,26828,26829,26830,26831,26832,26833,26834,26835,26836,26837,26838,26839,26840,26841,26842,26843,26844,26845,26846,26847,26848,26849,26850,26851,26852,26853,26854,26855,26856,26857,26858,26859,26860,26861,26862,26863,26864,26865,26866,26867,26868,26869,26870,26871,26872,26873,26874,26875,26876,26877,26878,26879,26880,26881,26882,26883,26884,26885,26886,26887,26888,26889,26890,26891,26892,26893,26894,26895,26896,26897,26898,26899,26900,26901,26902,26903,26904,26905,26906,26907,26908,26909,26910,26911,26912,26913,26914,26915,26916,26917,26918,26919,26920,26921,26922,26923,26924,26925,26926,26927,26928,26929,26930,26931,26932,26933,26934,26935,26936,26937,26938,26939,26940,26941,26942,26943,26944,26945,26946,26947,26948,26949,26950,26951,26952,26953,26954,26955,26956,26957,26958,26959,26960,26961,26962,26963,26964,26965,26966,26967,26968,26969,26970,26971,26972,26973,26974,26975,26976,26977,26978,26979,26980,26981,26982,26983,26984,26985,26986,26987,26988,26989,26990,26991,26992,26993,26994,26995,26996,26997,26998,26999,27000,27001,27002,27003,27004,27005,27006,27007,27008,27009,27010,27011,27012,27013,27014,27015,27016,27017,27018,27019,27020,27021,27022,27023,27024,27025,27026,27027,27028,27029,27030,27031,27032,27033,27034,27035,27036,27037,27038,27039,27040,27041,27042,27043,27044,27045,27046,27047,27048,27049,27050,27051,27052,27053,27054,27055,27056,27057,27058,27059,27060,27061,27062,27063,27064,27065,27066,27067,27068,27069,27070,27071,27072,27073,27074,27075,27076,27077,27078,27079,27080,27081,27082,27083,27084,27085,27086,27087,27088,27089,27090,27091,27092,27093,27094,27095,27096,27097,27098,27099,27100,27101,27102,27103,27104,27105,27106,27107,27108,27109,27110,27111,27112,27113,27114,27115,27116,27117,27118,27119,27120,27121,27122,27123,27124,27125,27126,27127,27128,27129,27130,27131,27132,27133,27134,27135,27136,27137,27138,27139,27140,27141,27142,27143,27144,27145,27146,27147,27148,27149,27150,27151,27152,27153,27154,27155,27156,27157,27158,27159,27160,27161,27162,27163,27164,27165,27166,27167,27168,27169,27170,27171,27172,27173,27174,27175,27176,27177,27178,27179,27180,27181,27182,27183,27184,27185,27186,27187,27188,27189,27190,27191,27192,27193,27194,27195,27196,27197,27198,27199,27200,27201,27202,27203,27204,27205,27206,27207,27208,27209,27210,27211,27212,27213,27214,27215,27216,27217,27218,27219,27220,27221,27222,27223,27224,27225,27226,27227,27228,27229,27230,27231,27232,27233,27234,27235,27236,27237,27238,27239,27240,27241,27242,27243,27244,27245,27246,27247,27248,27249,27250,27251,27252,27253,27254,27255,27256,27257,27258,27259,27260,27261,27262,27263,27264,27265,27266,27267,27268,27269,27270,27271,27272,27273,27274,27275,27276,27277,27278,27279,27280,27281,27282,27283,27284,27285,27286,27287,27288,27289,27290,27291,27292,27293,27294,27295,27296,27297,27298,27299,27300,27301,27302,27303,27304,27305,27306,27307,27308,27309,27310,27311,27312,27313,27314,27315,27316,27317,27318,27319,27320,27321,27322,27323,27324,27325,27326,27327,27328,27329,27330,27331,27332,27333,27334,27335,27336,27337,27338,27339,27340,27341,27342,27343,27344,27345,27346,27347,27348,27349,27350,27351,27352,27353,27354,27355,27356,27357,27358,27359,27360,27361,27362,27363,27364,27365,27366,27367,27368,27369,27370,27371,27372,27373,27374,27375,27376,27377,27378,27379,27380,27381,27382,27383,27384,27385,27386,27387,27388,27389,27390,27391,27392,27393,27394,27395,27396,27397,27398,27399,27400,27401,27402,27403,27404,27405,27406,27407,27408,27409,27410,27411,27412,27413,27414,27415,27416,27417,27418,27419,27420,27421,27422,27423,27424,27425,27426,27427,27428,27429,27430,27431,27432,27433,27434,27435,27436,27437,27438,27439,27440,27441,27442,27443,27444,27445,27446,27447,27448,27449,27450,27451,27452,27453,27454,27455,27456,27457,27458,27459,27460,27461,27462,27463,27464,27465,27466,27467,27468,27469,27470,27471,27472,27473,27474,27475,27476,27477,27478,27479,27480,27481,27482,27483,27484,27485,27486,27487,27488,27489,27490,27491,27492,27493,27494,27495,27496,27497,27498,27499,27500,27501,27502,27503,27504,27505,27506,27507,27508,27509,27510,27511,27512,27513,27514,27515,27516,27517,27518,27519,27520,27521,27522,27523,27524,27525,27526,27527,27528,27529,27530,27531,27532,27533,27534,27535,27536,27537,27538,27539,27540,27541,27542,27543,27544,27545,27546,27547,27548,27549,27550,27551,27552,27553,27554,27555,27556,27557,27558,27559,27560,27561,27562,27563,27564,27565,27566,27567,27568,27569,27570,27571,27572,27573,27574,27575,27576,27577,27578,27579,27580,27581,27582,27583,27584,27585,27586,27587,27588,27589,27590,27591,27592,27593,27594,27595,27596,27597,27598,27599,27600,27601,27602,27603,27604,27605,27606,27607,27608,27609,27610,27611,27612,27613,27614,27615,27616,27617,27618,27619,27620,27621,27622,27623,27624,27625,27626,27627,27628,27629,27630,27631,27632,27633,27634,27635,27636,27637,27638,27639,27640,27641,27642,27643,27644,27645,27646,27647,27648,27649,27650,27651,27652,27653,27654,27655,27656,27657,27658,27659,27660,27661,27662,27663,27664,27665,27666,27667,27668,27669,27670,27671,27672,27673,27674,27675,27676,27677,27678,27679,27680,27681,27682,27683,27684,27685,27686,27687,27688,27689,27690,27691,27692,27693,27694,27695,27696,27697,27698,27699,27700,27701,27702,27703,27704,27705,27706,27707,27708,27709,27710,27711,27712,27713,27714,27715,27716,27717,27718,27719,27720,27721,27722,27723,27724,27725,27726,27727,27728,27729,27730,27731,27732,27733,27734,27735,27736,27737,27738,27739,27740,27741,27742,27743,27744,27745,27746,27747,27748,27749,27750,27751,27752,27753,27754,27755,27756,27757,27758,27759,27760,27761,27762,27763,27764,27765,27766,27767,27768,27769,27770,27771,27772,27773,27774,27775,27776,27777,27778,27779,27780,27781,27782,27783,27784,27785,27786,27787,27788,27789,27790,27791,27792,27793,27794,27795,27796,27797,27798,27799,27800,27801,27802,27803,27804,27805,27806,27807,27808,27809,27810,27811,27812,27813,27814,27815,27816,27817,27818,27819,27820,27821,27822,27823,27824,27825,27826,27827,27828,27829,27830,27831,27832,27833,27834,27835,27836,27837,27838,27839,27840,27841,27842,27843,27844,27845,27846,27847,27848,27849,27850,27851,27852,27853,27854,27855,27856,27857,27858,27859,27860,27861,27862,27863,27864,27865,27866,27867,27868,27869,27870,27871,27872,27873,27874,27875,27876,27877,27878,27879,27880,27881,27882,27883,27884,27885,27886,27887,27888,27889,27890,27891,27892,27893,27894,27895,27896,27897,27898,27899,27900,27901,27902,27903,27904,27905,27906,27907,27908,27909,27910,27911,27912,27913,27914,27915,27916,27917,27918,27919,27920,27921,27922,27923,27924,27925,27926,27927,27928,27929,27930,27931,27932,27933,27934,27935,27936,27937,27938,27939,27940,27941,27942,27943,27944,27945,27946,27947,27948,27949,27950,27951,27952,27953,27954,27955,27956,27957,27958,27959,27960,27961,27962,27963,27964,27965,27966,27967,27968,27969,27970,27971,27972,27973,27974,27975,27976,27977,27978,27979,27980,27981,27982,27983,27984,27985,27986,27987,27988,27989,27990,27991,27992,27993,27994,27995,27996,27997,27998,27999,28000,28001,28002,28003,28004,28005,28006,28007,28008,28009,28010,28011,28012,28013,28014,28015,28016,28017,28018,28019,28020,28021,28022,28023,28024,28025,28026,28027,28028,28029,28030,28031,28032,28033,28034,28035,28036,28037,28038,28039,28040,28041,28042,28043,28044,28045,28046,28047,28048,28049,28050,28051,28052,28053,28054,28055,28056,28057,28058,28059,28060,28061,28062,28063,28064,28065,28066,28067,28068,28069,28070,28071,28072,28073,28074,28075,28076,28077,28078,28079,28080,28081,28082,28083,28084,28085,28086,28087,28088,28089,28090,28091,28092,28093,28094,28095,28096,28097,28098,28099,28100,28101,28102,28103,28104,28105,28106,28107,28108,28109,28110,28111,28112,28113,28114,28115,28116,28117,28118,28119,28120,28121,28122,28123,28124,28125,28126,28127,28128,28129,28130,28131,28132,28133,28134,28135,28136,28137,28138,28139,28140,28141,28142,28143,28144,28145,28146,28147,28148,28149,28150,28151,28152,28153,28154,28155,28156,28157,28158,28159,28160,28161,28162,28163,28164,28165,28166,28167,28168,28169,28170,28171,28172,28173,28174,28175,28176,28177,28178,28179,28180,28181,28182,28183,28184,28185,28186,28187,28188,28189,28190,28191,28192,28193,28194,28195,28196,28197,28198,28199,28200,28201,28202,28203,28204,28205,28206,28207,28208,28209,28210,28211,28212,28213,28214,28215,28216,28217,28218,28219,28220,28221,28222,28223,28224,28225,28226,28227,28228,28229,28230,28231,28232,28233,28234,28235,28236,28237,28238,28239,28240,28241,28242,28243,28244,28245,28246,28247,28248,28249,28250,28251,28252,28253,28254,28255,28256,28257,28258,28259,28260,28261,28262,28263,28264,28265,28266,28267,28268,28269,28270,28271,28272,28273,28274,28275,28276,28277,28278,28279,28280,28281,28282,28283,28284,28285,28286,28287,28288,28289,28290,28291,28292,28293,28294,28295,28296,28297,28298,28299,28300,28301,28302,28303,28304,28305,28306,28307,28308,28309,28310,28311,28312,28313,28314,28315,28316,28317,28318,28319,28320,28321,28322,28323,28324,28325,28326,28327,28328,28329,28330,28331,28332,28333,28334,28335,28336,28337,28338,28339,28340,28341,28342,28343,28344,28345,28346,28347,28348,28349,28350,28351,28352,28353,28354,28355,28356,28357,28358,28359,28360,28361,28362,28363,28364,28365,28366,28367,28368,28369,28370,28371,28372,28373,28374,28375,28376,28377,28378,28379,28380,28381,28382,28383,28384,28385,28386,28387,28388,28389,28390,28391,28392,28393,28394,28395,28396,28397,28398,28399,28400,28401,28402,28403,28404,28405,28406,28407,28408,28409,28410,28411,28412,28413,28414,28415,28416,28417,28418,28419,28420,28421,28422,28423,28424,28425,28426,28427,28428,28429,28430,28431,28432,28433,28434,28435,28436,28437,28438,28439,28440,28441,28442,28443,28444,28445,28446,28447,28448,28449,28450,28451,28452,28453,28454,28455,28456,28457,28458,28459,28460,28461,28462,28463,28464,28465,28466,28467,28468,28469,28470,28471,28472,28473,28474,28475,28476,28477,28478,28479,28480,28481,28482,28483,28484,28485,28486,28487,28488,28489,28490,28491,28492,28493,28494,28495,28496,28497,28498,28499,28500,28501,28502,28503,28504,28505,28506,28507,28508,28509,28510,28511,28512,28513,28514,28515,28516,28517,28518,28519,28520,28521,28522,28523,28524,28525,28526,28527,28528,28529,28530,28531,28532,28533,28534,28535,28536,28537,28538,28539,28540,28541,28542,28543,28544,28545,28546,28547,28548,28549,28550,28551,28552,28553,28554,28555,28556,28557,28558,28559,28560,28561,28562,28563,28564,28565,28566,28567,28568,28569,28570,28571,28572,28573,28574,28575,28576,28577,28578,28579,28580,28581,28582,28583,28584,28585,28586,28587,28588,28589,28590,28591,28592,28593,28594,28595,28596,28597,28598,28599,28600,28601,28602,28603,28604,28605,28606,28607,28608,28609,28610,28611,28612,28613,28614,28615,28616,28617,28618,28619,28620,28621,28622,28623,28624,28625,28626,28627,28628,28629,28630,28631,28632,28633,28634,28635,28636,28637,28638,28639,28640,28641,28642,28643,28644,28645,28646,28647,28648,28649,28650,28651,28652,28653,28654,28655,28656,28657,28658,28659,28660,28661,28662,28663,28664,28665,28666,28667,28668,28669,28670,28671,28672,28673,28674,28675,28676,28677,28678,28679,28680,28681,28682,28683,28684,28685,28686,28687,28688,28689,28690,28691,28692,28693,28694,28695,28696,28697,28698,28699,28700,28701,28702,28703,28704,28705,28706,28707,28708,28709,28710,28711,28712,28713,28714,28715,28716,28717,28718,28719,28720,28721,28722,28723,28724,28725,28726,28727,28728,28729,28730,28731,28732,28733,28734,28735,28736,28737,28738,28739,28740,28741,28742,28743,28744,28745,28746,28747,28748,28749,28750,28751,28752,28753,28754,28755,28756,28757,28758,28759,28760,28761,28762,28763,28764,28765,28766,28767,28768,28769,28770,28771,28772,28773,28774,28775,28776,28777,28778,28779,28780,28781,28782,28783,28784,28785,28786,28787,28788,28789,28790,28791,28792,28793,28794,28795,28796,28797,28798,28799,28800,28801,28802,28803,28804,28805,28806,28807,28808,28809,28810,28811,28812,28813,28814,28815,28816,28817,28818,28819,28820,28821,28822,28823,28824,28825,28826,28827,28828,28829,28830,28831,28832,28833,28834,28835,28836,28837,28838,28839,28840,28841,28842,28843,28844,28845,28846,28847,28848,28849,28850,28851,28852,28853,28854,28855,28856,28857,28858,28859,28860,28861,28862,28863,28864,28865,28866,28867,28868,28869,28870,28871,28872,28873,28874,28875,28876,28877,28878,28879,28880,28881,28882,28883,28884,28885,28886,28887,28888,28889,28890,28891,28892,28893,28894,28895,28896,28897,28898,28899,28900,28901,28902,28903,28904,28905,28906,28907,28908,28909,28910,28911,28912,28913,28914,28915,28916,28917,28918,28919,28920,28921,28922,28923,28924,28925,28926,28927,28928,28929,28930,28931,28932,28933,28934,28935,28936,28937,28938,28939,28940,28941,28942,28943,28944,28945,28946,28947,28948,28949,28950,28951,28952,28953,28954,28955,28956,28957,28958,28959,28960,28961,28962,28963,28964,28965,28966,28967,28968,28969,28970,28971,28972,28973,28974,28975,28976,28977,28978,28979,28980,28981,28982,28983,28984,28985,28986,28987,28988,28989,28990,28991,28992,28993,28994,28995,28996,28997,28998,28999,29000,29001,29002,29003,29004,29005,29006,29007,29008,29009,29010,29011,29012,29013,29014,29015,29016,29017,29018,29019,29020,29021,29022,29023,29024,29025,29026,29027,29028,29029,29030,29031,29032,29033,29034,29035,29036,29037,29038,29039,29040,29041,29042,29043,29044,29045,29046,29047,29048,29049,29050,29051,29052,29053,29054,29055,29056,29057,29058,29059,29060,29061,29062,29063,29064,29065,29066,29067,29068,29069,29070,29071,29072,29073,29074,29075,29076,29077,29078,29079,29080,29081,29082,29083,29084,29085,29086,29087,29088,29089,29090,29091,29092,29093,29094,29095,29096,29097,29098,29099,29100,29101,29102,29103,29104,29105,29106,29107,29108,29109,29110,29111,29112,29113,29114,29115,29116,29117,29118,29119,29120,29121,29122,29123,29124,29125,29126,29127,29128,29129,29130,29131,29132,29133,29134,29135,29136,29137,29138,29139,29140,29141,29142,29143,29144,29145,29146,29147,29148,29149,29150,29151,29152,29153,29154,29155,29156,29157,29158,29159,29160,29161,29162,29163,29164,29165,29166,29167,29168,29169,29170,29171,29172,29173,29174,29175,29176,29177,29178,29179,29180,29181,29182,29183,29184,29185,29186,29187,29188,29189,29190,29191,29192,29193,29194,29195,29196,29197,29198,29199,29200,29201,29202,29203,29204,29205,29206,29207,29208,29209,29210,29211,29212,29213,29214,29215,29216,29217,29218,29219,29220,29221,29222,29223,29224,29225,29226,29227,29228,29229,29230,29231,29232,29233,29234,29235,29236,29237,29238,29239,29240,29241,29242,29243,29244,29245,29246,29247,29248,29249,29250,29251,29252,29253,29254,29255,29256,29257,29258,29259,29260,29261,29262,29263,29264,29265,29266,29267,29268,29269,29270,29271,29272,29273,29274,29275,29276,29277,29278,29279,29280,29281,29282,29283,29284,29285,29286,29287,29288,29289,29290,29291,29292,29293,29294,29295,29296,29297,29298,29299,29300,29301,29302,29303,29304,29305,29306,29307,29308,29309,29310,29311,29312,29313,29314,29315,29316,29317,29318,29319,29320,29321,29322,29323,29324,29325,29326,29327,29328,29329,29330,29331,29332,29333,29334,29335,29336,29337,29338,29339,29340,29341,29342,29343,29344,29345,29346,29347,29348,29349,29350,29351,29352,29353,29354,29355,29356,29357,29358,29359,29360,29361,29362,29363,29364,29365,29366,29367,29368,29369,29370,29371,29372,29373,29374,29375,29376,29377,29378,29379,29380,29381,29382,29383,29384,29385,29386,29387,29388,29389,29390,29391,29392,29393,29394,29395,29396,29397,29398,29399,29400,29401,29402,29403,29404,29405,29406,29407,29408,29409,29410,29411,29412,29413,29414,29415,29416,29417,29418,29419,29420,29421,29422,29423,29424,29425,29426,29427,29428,29429,29430,29431,29432,29433,29434,29435,29436,29437,29438,29439,29440,29441,29442,29443,29444,29445,29446,29447,29448,29449,29450,29451,29452,29453,29454,29455,29456,29457,29458,29459,29460,29461,29462,29463,29464,29465,29466,29467,29468,29469,29470,29471,29472,29473,29474,29475,29476,29477,29478,29479,29480,29481,29482,29483,29484,29485,29486,29487,29488,29489,29490,29491,29492,29493,29494,29495,29496,29497,29498,29499,29500,29501,29502,29503,29504,29505,29506,29507,29508,29509,29510,29511,29512,29513,29514,29515,29516,29517,29518,29519,29520,29521,29522,29523,29524,29525,29526,29527,29528,29529,29530,29531,29532,29533,29534,29535,29536,29537,29538,29539,29540,29541,29542,29543,29544,29545,29546,29547,29548,29549,29550,29551,29552,29553,29554,29555,29556,29557,29558,29559,29560,29561,29562,29563,29564,29565,29566,29567,29568,29569,29570,29571,29572,29573,29574,29575,29576,29577,29578,29579,29580,29581,29582,29583,29584,29585,29586,29587,29588,29589,29590,29591,29592,29593,29594,29595,29596,29597,29598,29599,29600,29601,29602,29603,29604,29605,29606,29607,29608,29609,29610,29611,29612,29613,29614,29615,29616,29617,29618,29619,29620,29621,29622,29623,29624,29625,29626,29627,29628,29629,29630,29631,29632,29633,29634,29635,29636,29637,29638,29639,29640,29641,29642,29643,29644,29645,29646,29647,29648,29649,29650,29651,29652,29653,29654,29655,29656,29657,29658,29659,29660,29661,29662,29663,29664,29665,29666,29667,29668,29669,29670,29671,29672,29673,29674,29675,29676,29677,29678,29679,29680,29681,29682,29683,29684,29685,29686,29687,29688,29689,29690,29691,29692,29693,29694,29695,29696,29697,29698,29699,29700,29701,29702,29703,29704,29705,29706,29707,29708,29709,29710,29711,29712,29713,29714,29715,29716,29717,29718,29719,29720,29721,29722,29723,29724,29725,29726,29727,29728,29729,29730,29731,29732,29733,29734,29735,29736,29737,29738,29739,29740,29741,29742,29743,29744,29745,29746,29747,29748,29749,29750,29751,29752,29753,29754,29755,29756,29757,29758,29759,29760,29761,29762,29763,29764,29765,29766,29767,29768,29769,29770,29771,29772,29773,29774,29775,29776,29777,29778,29779,29780,29781,29782,29783,29784,29785,29786,29787,29788,29789,29790,29791,29792,29793,29794,29795,29796,29797,29798,29799,29800,29801,29802,29803,29804,29805,29806,29807,29808,29809,29810,29811,29812,29813,29814,29815,29816,29817,29818,29819,29820,29821,29822,29823,29824,29825,29826,29827,29828,29829,29830,29831,29832,29833,29834,29835,29836,29837,29838,29839,29840,29841,29842,29843,29844,29845,29846,29847,29848,29849,29850,29851,29852,29853,29854,29855,29856,29857,29858,29859,29860,29861,29862,29863,29864,29865,29866,29867,29868,29869,29870,29871,29872,29873,29874,29875,29876,29877,29878,29879,29880,29881,29882,29883,29884,29885,29886,29887,29888,29889,29890,29891,29892,29893,29894,29895,29896,29897,29898,29899,29900,29901,29902,29903,29904,29905,29906,29907,29908,29909,29910,29911,29912,29913,29914,29915,29916,29917,29918,29919,29920,29921,29922,29923,29924,29925,29926,29927,29928,29929,29930,29931,29932,29933,29934,29935,29936,29937,29938,29939,29940,29941,29942,29943,29944,29945,29946,29947,29948,29949,29950,29951,29952,29953,29954,29955,29956,29957,29958,29959,29960,29961,29962,29963,29964,29965,29966,29967,29968,29969,29970,29971,29972,29973,29974,29975,29976,29977,29978,29979,29980,29981,29982,29983,29984,29985,29986,29987,29988,29989,29990,29991,29992,29993,29994,29995,29996,29997,29998,29999,30000,30001,30002,30003,30004,30005,30006,30007,30008,30009,30010,30011,30012,30013,30014,30015,30016,30017,30018,30019,30020,30021,30022,30023,30024,30025,30026,30027,30028,30029,30030,30031,30032,30033,30034,30035,30036,30037,30038,30039,30040,30041,30042,30043,30044,30045,30046,30047,30048,30049,30050,30051,30052,30053,30054,30055,30056,30057,30058,30059,30060,30061,30062,30063,30064,30065,30066,30067,30068,30069,30070,30071,30072,30073,30074,30075,30076,30077,30078,30079,30080,30081,30082,30083,30084,30085,30086,30087,30088,30089,30090,30091,30092,30093,30094,30095,30096,30097,30098,30099,30100,30101,30102,30103,30104,30105,30106,30107,30108,30109,30110,30111,30112,30113,30114,30115,30116,30117,30118,30119,30120,30121,30122,30123,30124,30125,30126,30127,30128,30129,30130,30131,30132,30133,30134,30135,30136,30137,30138,30139,30140,30141,30142,30143,30144,30145,30146,30147,30148,30149,30150,30151,30152,30153,30154,30155,30156,30157,30158,30159,30160,30161,30162,30163,30164,30165,30166,30167,30168,30169,30170,30171,30172,30173,30174,30175,30176,30177,30178,30179,30180,30181,30182,30183,30184,30185,30186,30187,30188,30189,30190,30191,30192,30193,30194,30195,30196,30197,30198,30199,30200,30201,30202,30203,30204,30205,30206,30207,30208,30209,30210,30211,30212,30213,30214,30215,30216,30217,30218,30219,30220,30221,30222,30223,30224,30225,30226,30227,30228,30229,30230,30231,30232,30233,30234,30235,30236,30237,30238,30239,30240,30241,30242,30243,30244,30245,30246,30247,30248,30249,30250,30251,30252,30253,30254,30255,30256,30257,30258,30259,30260,30261,30262,30263,30264,30265,30266,30267,30268,30269,30270,30271,30272,30273,30274,30275,30276,30277,30278,30279,30280,30281,30282,30283,30284,30285,30286,30287,30288,30289,30290,30291,30292,30293,30294,30295,30296,30297,30298,30299,30300,30301,30302,30303,30304,30305,30306,30307,30308,30309,30310,30311,30312,30313,30314,30315,30316,30317,30318,30319,30320,30321,30322,30323,30324,30325,30326,30327,30328,30329,30330,30331,30332,30333,30334,30335,30336,30337,30338,30339,30340,30341,30342,30343,30344,30345,30346,30347,30348,30349,30350,30351,30352,30353,30354,30355,30356,30357,30358,30359,30360,30361,30362,30363,30364,30365,30366,30367,30368,30369,30370,30371,30372,30373,30374,30375,30376,30377,30378,30379,30380,30381,30382,30383,30384,30385,30386,30387,30388,30389,30390,30391,30392,30393,30394,30395,30396,30397,30398,30399,30400,30401,30402,30403,30404,30405,30406,30407,30408,30409,30410,30411,30412,30413,30414,30415,30416,30417,30418,30419,30420,30421,30422,30423,30424,30425,30426,30427,30428,30429,30430,30431,30432,30433,30434,30435,30436,30437,30438,30439,30440,30441,30442,30443,30444,30445,30446,30447,30448,30449,30450,30451,30452,30453,30454,30455,30456,30457,30458,30459,30460,30461,30462,30463,30464,30465,30466,30467,30468,30469,30470,30471,30472,30473,30474,30475,30476,30477,30478,30479,30480,30481,30482,30483,30484,30485,30486,30487,30488,30489,30490,30491,30492,30493,30494,30495,30496,30497,30498,30499,30500,30501,30502,30503,30504,30505,30506,30507,30508,30509,30510,30511,30512,30513,30514,30515,30516,30517,30518,30519,30520,30521,30522,30523,30524,30525,30526,30527,30528,30529,30530,30531,30532,30533,30534,30535,30536,30537,30538,30539,30540,30541,30542,30543,30544,30545,30546,30547,30548,30549,30550,30551,30552,30553,30554,30555,30556,30557,30558,30559,30560,30561,30562,30563,30564,30565,30566,30567,30568,30569,30570,30571,30572,30573,30574,30575,30576,30577,30578,30579,30580,30581,30582,30583,30584,30585,30586,30587,30588,30589,30590,30591,30592,30593,30594,30595,30596,30597,30598,30599,30600,30601,30602,30603,30604,30605,30606,30607,30608,30609,30610,30611,30612,30613,30614,30615,30616,30617,30618,30619,30620,30621,30622,30623,30624,30625,30626,30627,30628,30629,30630,30631,30632,30633,30634,30635,30636,30637,30638,30639,30640,30641,30642,30643,30644,30645,30646,30647,30648,30649,30650,30651,30652,30653,30654,30655,30656,30657,30658,30659,30660,30661,30662,30663,30664,30665,30666,30667,30668,30669,30670,30671,30672,30673,30674,30675,30676,30677,30678,30679,30680,30681,30682,30683,30684,30685,30686,30687,30688,30689,30690,30691,30692,30693,30694,30695,30696,30697,30698,30699,30700,30701,30702,30703,30704,30705,30706,30707,30708,30709,30710,30711,30712,30713,30714,30715,30716,30717,30718,30719,30720,30721,30722,30723,30724,30725,30726,30727,30728,30729,30730,30731,30732,30733,30734,30735,30736,30737,30738,30739,30740,30741,30742,30743,30744,30745,30746,30747,30748,30749,30750,30751,30752,30753,30754,30755,30756,30757,30758,30759,30760,30761,30762,30763,30764,30765,30766,30767,30768,30769,30770,30771,30772,30773,30774,30775,30776,30777,30778,30779,30780,30781,30782,30783,30784,30785,30786,30787,30788,30789,30790,30791,30792,30793,30794,30795,30796,30797,30798,30799,30800,30801,30802,30803,30804,30805,30806,30807,30808,30809,30810,30811,30812,30813,30814,30815,30816,30817,30818,30819,30820,30821,30822,30823,30824,30825,30826,30827,30828,30829,30830,30831,30832,30833,30834,30835,30836,30837,30838,30839,30840,30841,30842,30843,30844,30845,30846,30847,30848,30849,30850,30851,30852,30853,30854,30855,30856,30857,30858,30859,30860,30861,30862,30863,30864,30865,30866,30867,30868,30869,30870,30871,30872,30873,30874,30875,30876,30877,30878,30879,30880,30881,30882,30883,30884,30885,30886,30887,30888,30889,30890,30891,30892,30893,30894,30895,30896,30897,30898,30899,30900,30901,30902,30903,30904,30905,30906,30907,30908,30909,30910,30911,30912,30913,30914,30915,30916,30917,30918,30919,30920,30921,30922,30923,30924,30925,30926,30927,30928,30929,30930,30931,30932,30933,30934,30935,30936,30937,30938,30939,30940,30941,30942,30943,30944,30945,30946,30947,30948,30949,30950,30951,30952,30953,30954,30955,30956,30957,30958,30959,30960,30961,30962,30963,30964,30965,30966,30967,30968,30969,30970,30971,30972,30973,30974,30975,30976,30977,30978,30979,30980,30981,30982,30983,30984,30985,30986,30987,30988,30989,30990,30991,30992,30993,30994,30995,30996,30997,30998,30999,31000,31001,31002,31003,31004,31005,31006,31007,31008,31009,31010,31011,31012,31013,31014,31015,31016,31017,31018,31019,31020,31021,31022,31023,31024,31025,31026,31027,31028,31029,31030,31031,31032,31033,31034,31035,31036,31037,31038,31039,31040,31041,31042,31043,31044,31045,31046,31047,31048,31049,31050,31051,31052,31053,31054,31055,31056,31057,31058,31059,31060,31061,31062,31063,31064,31065,31066,31067,31068,31069,31070,31071,31072,31073,31074,31075,31076,31077,31078,31079,31080,31081,31082,31083,31084,31085,31086,31087,31088,31089,31090,31091,31092,31093,31094,31095,31096,31097,31098,31099,31100,31101,31102,31103,31104,31105,31106,31107,31108,31109,31110,31111,31112,31113,31114,31115,31116,31117,31118,31119,31120,31121,31122,31123,31124,31125,31126,31127,31128,31129,31130,31131,31132,31133,31134,31135,31136,31137,31138,31139,31140,31141,31142,31143,31144,31145,31146,31147,31148,31149,31150,31151,31152,31153,31154,31155,31156,31157,31158,31159,31160,31161,31162,31163,31164,31165,31166,31167,31168,31169,31170,31171,31172,31173,31174,31175,31176,31177,31178,31179,31180,31181,31182,31183,31184,31185,31186,31187,31188,31189,31190,31191,31192,31193,31194,31195,31196,31197,31198,31199,31200,31201,31202,31203,31204,31205,31206,31207,31208,31209,31210,31211,31212,31213,31214,31215,31216,31217,31218,31219,31220,31221,31222,31223,31224,31225,31226,31227,31228,31229,31230,31231,31232,31233,31234,31235,31236,31237,31238,31239,31240,31241,31242,31243,31244,31245,31246,31247,31248,31249,31250,31251,31252,31253,31254,31255,31256,31257,31258,31259,31260,31261,31262,31263,31264,31265,31266,31267,31268,31269,31270,31271,31272,31273,31274,31275,31276,31277,31278,31279,31280,31281,31282,31283,31284,31285,31286,31287,31288,31289,31290,31291,31292,31293,31294,31295,31296,31297,31298,31299,31300,31301,31302,31303,31304,31305,31306,31307,31308,31309,31310,31311,31312,31313,31314,31315,31316,31317,31318,31319,31320,31321,31322,31323,31324,31325,31326,31327,31328,31329,31330,31331,31332,31333,31334,31335,31336,31337,31338,31339,31340,31341,31342,31343,31344,31345,31346,31347,31348,31349,31350,31351,31352,31353,31354,31355,31356,31357,31358,31359,31360,31361,31362,31363,31364,31365,31366,31367,31368,31369,31370,31371,31372,31373,31374,31375,31376,31377,31378,31379,31380,31381,31382,31383,31384,31385,31386,31387,31388,31389,31390,31391,31392,31393,31394,31395,31396,31397,31398,31399,31400,31401,31402,31403,31404,31405,31406,31407,31408,31409,31410,31411,31412,31413,31414,31415,31416,31417,31418,31419,31420,31421,31422,31423,31424,31425,31426,31427,31428,31429,31430,31431,31432,31433,31434,31435,31436,31437,31438,31439,31440,31441,31442,31443,31444,31445,31446,31447,31448,31449,31450,31451,31452,31453,31454,31455,31456,31457,31458,31459,31460,31461,31462,31463,31464,31465,31466,31467,31468,31469,31470,31471,31472,31473,31474,31475,31476,31477,31478,31479,31480,31481,31482,31483,31484,31485,31486,31487,31488,31489,31490,31491,31492,31493,31494,31495,31496,31497,31498,31499,31500,31501,31502,31503,31504,31505,31506,31507,31508,31509,31510,31511,31512,31513,31514,31515,31516,31517,31518,31519,31520,31521,31522,31523,31524,31525,31526,31527,31528,31529,31530,31531,31532,31533,31534,31535,31536,31537,31538,31539,31540,31541,31542,31543,31544,31545,31546,31547,31548,31549,31550,31551,31552,31553,31554,31555,31556,31557,31558,31559,31560,31561,31562,31563,31564,31565,31566,31567,31568,31569,31570,31571,31572,31573,31574,31575,31576,31577,31578,31579,31580,31581,31582,31583,31584,31585,31586,31587,31588,31589,31590,31591,31592,31593,31594,31595,31596,31597,31598,31599,31600,31601,31602,31603,31604,31605,31606,31607,31608,31609,31610,31611,31612,31613,31614,31615,31616,31617,31618,31619,31620,31621,31622,31623,31624,31625,31626,31627,31628,31629,31630,31631,31632,31633,31634,31635,31636,31637,31638,31639,31640,31641,31642,31643,31644,31645,31646,31647,31648,31649,31650,31651,31652,31653,31654,31655,31656,31657,31658,31659,31660,31661,31662,31663,31664,31665,31666,31667,31668,31669,31670,31671,31672,31673,31674,31675,31676,31677,31678,31679,31680,31681,31682,31683,31684,31685,31686,31687,31688,31689,31690,31691,31692,31693,31694,31695,31696,31697,31698,31699,31700,31701,31702,31703,31704,31705,31706,31707,31708,31709,31710,31711,31712,31713,31714,31715,31716,31717,31718,31719,31720,31721,31722,31723,31724,31725,31726,31727,31728,31729,31730,31731,31732,31733,31734,31735,31736,31737,31738,31739,31740,31741,31742,31743,31744,31745,31746,31747,31748,31749,31750,31751,31752,31753,31754,31755,31756,31757,31758,31759,31760,31761,31762,31763,31764,31765,31766,31767,31768,31769,31770,31771,31772,31773,31774,31775,31776,31777,31778,31779,31780,31781,31782,31783,31784,31785,31786,31787,31788,31789,31790,31791,31792,31793,31794,31795,31796,31797,31798,31799,31800,31801,31802,31803,31804,31805,31806,31807,31808,31809,31810,31811,31812,31813,31814,31815,31816,31817,31818,31819,31820,31821,31822,31823,31824,31825,31826,31827,31828,31829,31830,31831,31832,31833,31834,31835,31836,31837,31838,31839,31840,31841,31842,31843,31844,31845,31846,31847,31848,31849,31850,31851,31852,31853,31854,31855,31856,31857,31858,31859,31860,31861,31862,31863,31864,31865,31866,31867,31868,31869,31870,31871,31872,31873,31874,31875,31876,31877,31878,31879,31880,31881,31882,31883,31884,31885,31886,31887,31888,31889,31890,31891,31892,31893,31894,31895,31896,31897,31898,31899,31900,31901,31902,31903,31904,31905,31906,31907,31908,31909,31910,31911,31912,31913,31914,31915,31916,31917,31918,31919,31920,31921,31922,31923,31924,31925,31926,31927,31928,31929,31930,31931,31932,31933,31934,31935,31936,31937,31938,31939,31940,31941,31942,31943,31944,31945,31946,31947,31948,31949,31950,31951,31952,31953,31954,31955,31956,31957,31958,31959,31960,31961,31962,31963,31964,31965,31966,31967,31968,31969,31970,31971,31972,31973,31975,31976,31977,31978,31979,31980,31981,31982,31983,31984,31985,31986,31987,31988,31989,31990,31991,31992,31993,31994,31995,31996,31997,31998,31999,32000,32001,32002,32003,32004,32005,32006,32007,32008,32009,32010,32011,32012,32013,32014,32015,32016,32017,32018,32019,32020,32021,32022,32023,32024,32025,32026,32027,32028,32029,32030,32031,32032,32033,32034,32035,32036,32037,32038,32039,32040,32041,32042,32043,32044,32045,32046,32047,32048,32049,32050,32051,32052,32053,32054,32055,32056,32057,32058,32059,32060,32061,32062,32063,32064,32065,32066,32067,32068,32069,32070,32071,32072,32073,32074,32075,32076,32077,32078,32079,32080,32081,32082,32083,32084,32085,32086,32087,32088,32089,32090,32091,32092,32093,32094,32095,32096,32097,32098,32099,32100,32101,32102,32103,32104,32105,32106,32107,32108,32109,32110,32111,32112,32113,32114,32115,32116,32117,32118,32119,32120,32121,32122,32123,32124,32125,32126,32127,32128,32129,32130,32131,32132,32133,32134,32135,32136,32137,32138,32139,32140,32141,32142,32143,32144,32145,32146,32147,32148,32149,32150,32151,32152,32153,32154,32155,32156,32157,32158,32159,32160,32161,32162,32163,32164,32165,32166,32167,32168,32169,32170,32171,32172,32173,32174,32175,32176,32177,32178,32179,32180,32181,32182,32183,32184,32185,32186,32187,32188,32189,32190,32191,32192,32193,32194,32195,32196,32197,32198,32199,32200,32201,32202,32203,32204,32205,32206,32207,32208,32209,32210,32211,32212,32213,32214,32215,32216,32217,32218,32219,32220,32221,32222,32223,32224,32225,32226,32227,32228,32229,32230,32231,32232,32233,32234,32235,32236,32237,32238,32239,32240,32241,32242,32243,32244,32245,32246,32247,32248,32249,32250,32251,32252,32253,32254,32255,32256,32257,32258,32259,32260,32261,32262,32263,32264,32265,32266,32267,32268,32269,32270,32271,32272,32273,32274,32275,32276,32277,32278,32279,32280,32281,32282,32283,32284,32285,32286,32287,32288,32289,32290,32291,32292,32293,32294,32295,32296,32297,32298,32299,32300,32301,32302,32303,32304,32305,32306,32307,32308,32309,32310,32311,32312,32313,32314,32315,32316,32317,32318,32319,32320,32321,32322,32323,32324,32325,32326,32327,32328,32329,32330,32331,32332,32333,32334,32335,32336,32337,32338,32339,32340,32341,32342,32343,32344,32345,32346,32347,32348,32349,32350,32351,32352,32353,32354,32355,32356,32357,32358,32359,32360,32361,32362,32363,32364,32365,32366,32367,32368,32369,32370,32371,32372,32373,32374,32375,32376,32377,32378,32379,32380,32381,32382,32383,32384,32385,32386,32387,32388,32389,32390,32391,32392,32393,32394,32395,32396,32397,32398,32399,32400,32401,32402,32403,32404,32405,32406,32407,32408,32409,32410,32411,32412,32413,32414,32415,32416,32417,32418,32419,32420,32421,32422,32423,32424,32425,32426,32427,32428,32429,32430,32431,32432,32433,32434,32435,32436,32437,32438,32439,32440,32441,32442,32443,32444,32445,32446,32447,32448,32449,32450,32451,32452,32453,32454,32455,32456,32457,32458,32459,32460,32461,32462,32463,32464,32465,32466,32467,32468,32469,32470,32471,32472,32473,32474,32475,32476,32477,32478,32479,32480,32481,32482,32483,32484,32485,32486,32487,32488,32489,32490,32491,32492,32493,32494,32495,32496,32497,32498,32499,32500,32501,32502,32503,32504,32505,32506,32507,32508,32509,32510,32511,32512,32513,32514,32515,32516,32517,32518,32519,32520,32521,32522,32523,32524,32525,32526,32527,32528,32529,32530,32531,32532,32533,32534,32535,32536,32537,32538,32539,32540,32541,32542,32543,32544,32545,32546,32547,32548,32549,32550,32551,32552,32553,32554,32555,32556,32557,32558,32559,32560,32561,32562,32563,32564,32565,32566,32567,32568,32569,32570,32571,32572,32573,32574,32575,32576,32577,32578,32579,32580,32581,32582,32583,32584,32585,32586,32587,32588,32589,32590,32591,32592,32593,32594,32595,32596,32597,32598,32599,32600,32601,32602,32603,32604,32605,32606,32607,32608,32609,32610,32611,32612,32613,32614,32615,32616,32617,32618,32619,32620,32621,32622,32623,32624,32625,32626,32627,32628,32629,32630,32631,32632,32633,32634,32635,32636,32637,32638,32639,32640,32641,32642,32643,32644,32645,32646,32647,32648,32649,32650,32651,32652,32653,32654,32655,32656,32657,32658,32659,32660,32661,32662,32663,32664,32665,32666,32667,32668,32669,32670,32671,32672,32673,32674,32675,32676,32677,32678,32679,32680,32681,32682,32683,32684,32685,32686,32687,32688,32689,32690,32691,32692,32693,32694,32695,32696,32697,32698,32699,32700,32701,32702,32703,32704,32705,32706,32707,32708,32709,32710,32711,32712,32713,32714,32715,32716,32717,32718,32719,32720,32721,32722,32723,32724,32725,32726,32727,32728,32729,32730,32731,32732,32733,32734,32735,32736,32737,32738,32739,32740,32741,32742,32743,32744,32745,32746,32747,32748,32749,32750,32751,32752,32753,32754,32755,32756,32757,32758,32759,32760,32761,32762,32763,32764,32765,32766,32767,32768,32769,32770,32771,32772,32773,32774,32775,32776,32777,32778,32779,32780,32781,32782,32783,32784,32785,32786,32787,32788,32789,32790,32791,32792,32793,32794,32795,32796,32797,32798,32799,32800,32801,32802,32803,32804,32805,32806,32807,32808,32809,32810,32811,32812,32813,32814,32815,32816,32817,32818,32819,32820,32821,32822,32823,32824,32825,32826,32827,32828,32829,32830,32831,32832,32833,32834,32835,32836,32837,32838,32839,32840,32841,32842,32843,32844,32845,32846,32847,32848,32849,32850,32851,32852,32853,32854,32855,32856,32857,32858,32859,32860,32861,32862,32863,32864,32865,32866,32867,32868,32869,32870,32871,32872,32873,32874,32875,32876,32877,32878,32879,32880,32881,32882,32883,32884,32885,32886,32887,32888,32889,32890,32891,32892,32893,32894,32895,32896,32897,32898,32899,32900,32901,32902,32903,32904,32905,32906,32907,32908,32909,32910,32911,32912,32913,32914,32915,32916,32917,32918,32919,32920,32921,32922,32923,32924,32925,32926,32927,32928,32929,32930,32931,32932,32933,32934,32935,32936,32937,32938,32939,32940,32941,32942,32943,32944,32945,32946,32947,32948,32949,32950,32951,32952,32953,32954,32955,32956,32957,32958,32959,32960,32961,32962,32963,32964,32965,32966,32967,32968,32969,32970,32971,32972,32973,32974,32975,32976,32977,32978,32979,32980,32981,32982,32983,32984,32985,32986,32987,32988,32989,32990,32991,32992,32993,32994,32995,32996,32997,32998,32999,33000,33001,33002,33003,33004,33005,33006,33007,33008,33009,33010,33011,33012,33013,33014,33015,33016,33017,33018,33019,33020,33021,33022,33023,33024,33025,33026,33027,33028,33029,33030,33031,33032,33033,33034,33035,33036,33037,33038,33039,33040,33041,33042,33043,33044,33045,33046,33047,33048,33049,33050,33051,33052,33053,33054,33055,33056,33057,33058,33059,33060,33061,33062,33063,33064,33065,33066,33067,33068,33069,33070,33071,33072,33073,33074,33075,33076,33077,33078,33079,33080,33081,33082,33083,33084,33085,33086,33087,33088,33089,33090,33091,33092,33093,33094,33095,33096,33097,33098,33099,33100,33101,33102,33103,33104,33105,33106,33107,33108,33109,33110,33111,33112,33113,33114,33115,33116,33117,33118,33119,33120,33121,33122,33123,33124,33125,33126,33127,33128,33129,33130,33131,33132,33133,33134,33135,33136,33137,33138,33139,33140,33141,33142,33143,33144,33145,33146,33147,33148,33149,33150,33151,33152,33153,33154,33155,33156,33157,33158,33159,33160,33161,33162,33163,33164,33165,33166,33167,33168,33169,33170,33171,33172,33173,33174,33175,33176,33177,33178,33179,33180,33181,33182,33183,33184,33185,33186,33187,33188,33189,33190,33191,33192,33193,33194,33195,33196,33197,33198,33199,33200,33201,33202,33203,33204,33205,33206,33207,33208,33209,33210,33211,33212,33213,33214,33215,33216,33217,33218,33219,33220,33221,33222,33223,33224,33225,33226,33227,33228,33229,33230,33231,33232,33233,33234,33235,33236,33237,33238,33239,33240,33241,33242,33243,33244,33245,33246,33247,33248,33249,33250,33251,33252,33253,33254,33255,33256,33257,33258,33259,33260,33261,33262,33263,33264,33265,33266,33267,33268,33269,33270,33271,33272,33273,33274,33275,33276,33277,33278,33279,33280,33281,33282,33283,33284,33285,33286,33287,33288,33289,33290,33291,33292,33293,33294,33295,33296,33297,33298,33299,33300,33301,33302,33303,33304,33305,33306,33307,33308,33309,33310,33311,33312,33313,33314,33315,33316,33317,33318,33319,33320,33321,33322,33323,33324,33325,33326,33327,33328,33329,33330,33331,33332,33333,33334,33335,33336,33337,33338,33339,33340,33341,33342,33343,33344,33345,33346,33347,33348,33349,33350,33351,33352,33353,33354,33355,33356,33357,33358,33359,33360,33361,33362,33363,33364,33365,33366,33367,33368,33369,33370,33371,33372,33373,33374,33375,33376,33377,33378,33379,33380,33381,33382,33383,33384,33385,33386,33387,33388,33389,33390,33391,33392,33393,33394,33395,33396,33397,33398,33399,33400,33401,33402,33403,33404,33405,33406,33407,33408,33409,33410,33411,33412,33413,33414,33415,33416,33417,33418,33419,33420,33421,33422,33423,33424,33425,33426,33427,33428,33429,33430,33431,33432,33433,33434,33435,33436,33437,33438,33439,33440,33441,33442,33443,33444,33445,33446,33447,33448,33449,33450,33451,33452,33453,33454,33455,33456,33457,33458,33459,33460,33461,33462,33463,33464,33465,33466,33467,33468,33469,33470,33471,33472,33473,33474,33475,33476,33477,33478,33479,33480,33481,33482,33483,33484,33485,33486,33487,33488,33489,33490,33491,33492,33493,33494,33495,33496,33497,33498,33499,33500,33501,33502,33503,33504,33505,33506,33507,33508,33509,33510,33511,33512,33513,33514,33515,33516,33517,33518,33519,33520,33521,33522,33523,33524,33525,33526,33527,33528,33529,33530,33531,33532,33533,33534,33535,33536,33537,33538,33539,33540,33541,33542,33543,33544,33545,33546,33547,33548,33549,33550,33551,33552,33553,33554,33555,33556,33557,33558,33559,33560,33561,33562,33563,33564,33565,33566,33567,33568,33569,33570,33571,33572,33573,33574,33575,33576,33577,33578,33579,33580,33581,33582,33583,33584,33585,33586,33587,33588,33589,33590,33591,33592,33593,33594,33595,33596,33597,33598,33599,33600,33601,33602,33603,33604,33605,33606,33607,33608,33609,33610,33611,33612,33613,33614,33615,33616,33617,33618,33619,33620,33621,33622,33623,33624,33625,33626,33627,33628,33629,33630,33631,33632,33633,33634,33635,33636,33637,33638,33639,33640,33641,33642,33643,33644,33645,33646,33647,33648,33649,33650,33651,33652,33653,33654,33655,33656,33657,33658,33659,33660,33661,33662,33663,33664,33665,33666,33667,33668,33669,33670,33671,33672,33673,33674,33675,33676,33677,33678,33679,33680,33681,33682,33683,33684,33685,33686,33687,33688,33689,33690,33691,33692,33693,33694,33695,33696,33697,33698,33699,33700,33701,33702,33703,33704,33705,33706,33707,33708,33709,33710,33711,33712,33713,33714,33715,33716,33717,33718,33719,33720,33721,33722,33723,33724,33725,33726,33727,33728,33729,33730,33731,33732,33733,33734,33735,33736,33737,33738,33739,33740,33741,33742,33743,33744,33745,33746,33747,33748,33749,33750,33751,33752,33753,33754,33755,33756,33757,33758,33759,33760,33761,33762,33763,33764,33765,33766,33767,33768,33769,33770,33771,33772,33773,33774,33775,33776,33777,33778,33779,33780,33781,33782,33783,33784,33785,33786,33787,33788,33789,33790,33791,33792,33793,33794,33795,33796,33797,33798,33799,33800,33801,33802,33803,33804,33805,33806,33807,33808,33809,33810,33811,33812,33813,33814,33815,33816,33817,33818,33819,33820,33821,33822,33823,33824,33825,33826,33827,33828,33829,33830,33831,33832,33833,33834,33835,33836,33837,33838,33839,33840,33841,33842,33843,33844,33845,33846,33847,33848,33849,33850,33851,33852,33853,33854,33855,33856,33857,33858,33859,33860,33861,33862,33863,33864,33865,33866,33867,33868,33869,33870,33871,33872,33873,33874,33875,33876,33877,33878,33879,33880,33881,33882,33883,33884,33885,33886,33887,33888,33889,33890,33891,33892,33893,33894,33895,33896,33897,33898,33899,33900,33901,33902,33903,33904,33905,33906,33907,33908,33909,33910,33911,33912,33913,33914,33915,33916,33917,33918,33919,33920,33921,33922,33923,33924,33925,33926,33927,33928,33929,33930,33931,33932,33933,33934,33935,33936,33937,33938,33939,33940,33941,33942,33943,33944,33945,33946,33947,33948,33949,33950,33951,33952,33953,33954,33955,33956,33957,33958,33959,33960,33961,33962,33963,33964,33965,33966,33967,33968,33969,33970,33971,33972,33973,33974,33975,33976,33977,33978,33979,33980,33981,33982,33983,33984,33985,33986,33987,33988,33989,33990,33991,33992,33993,33994,33995,33996,33997,33998,33999,34000,34001,34002,34003,34004,34005,34006,34007,34008,34009,34010,34011,34012,34013,34014,34015,34016,34017,34018,34019,34020,34021,34022,34023,34024,34025,34026,34027,34028,34029,34030,34031,34032,34033,34034,34035,34036,34037,34038,34039,34040,34041,34042,34043,34044,34045,34046,34047,34048,34049,34050,34051,34052,34053,34054,34055,34056,34057,34058,34059,34060,34061,34062,34063,34064,34065,34066,34067,34068,34069,34070,34071,34072,34073,34074,34075,34076,34077,34078,34079,34080,34081,34082,34083,34084,34085,34086,34087,34088,34089,34090,34091,34092,34093,34094,34095,34096,34097,34098,34099,34100,34101,34102,34103,34104,34105,34106,34107,34108,34109,34110,34111,34112,34113,34114,34115,34116,34117,34118,34119,34120,34121,34122,34123,34124,34125,34126,34127,34128,34129,34130,34131,34132,34133,34134,34135,34136,34137,34138,34139,34140,34141,34142,34143,34144,34145,34146,34147,34148,34149,34150,34151,34152,34153,34154,34155,34156,34157,34158,34159,34160,34161,34162,34163,34164,34165,34166,34167,34168,34169,34170,34171,34172,34173,34174,34175,34176,34177,34178,34179,34180,34181,34182,34183,34184,34185,34186,34187,34188,34189,34190,34191,34192,34193,34194,34195,34196,34197,34198,34199,34200,34201,34202,34203,34204,34205,34206,34207,34208,34209,34210,34211,34212,34213,34214,34215,34216,34217,34218,34219,34220,34221,34222,34223,34224,34225,34226,34227,34228,34229,34230,34231,34232,34233,34234,34235,34236,34237,34238,34239,34240,34241,34242,34243,34244,34245,34246,34247,34248,34249,34250,34251,34252,34253,34254,34255,34256,34257,34258,34259,34260,34261,34262,34263,34264,34265,34266,34267,34268,34269,34270,34271,34272,34273,34274,34275,34276,34277,34278,34279,34280,34281,34282,34283,34284,34285,34286,34287,34288,34289,34290,34291,34292,34293,34294,34295,34296,34297,34298,34299,34300,34301,34302,34303,34304,34305,34306,34307,34308,34309,34310,34311,34312,34313,34314,34315,34316,34317,34318,34319,34320,34321,34322,34323,34324,34325,34326,34327,34328,34329,34330,34331,34332,34333,34334,34335,34336,34337,34338,34339,34340,34341,34342,34344,34345,34346,34347,34348,34349,34350,34351,34352,34353,34354,34355,34356,34357,34358,34359,34360,34361,34362,34363,34364,34365,34366,34367,34368,34369,34370,34371,34372,34373,34374,34375,34376,34377,34378,34379,34380,34381,34382,34383,34384,34385,34386,34387,34388,34389,34390,34391,34392,34393,34394,34395,34396,34397,34398,34399,34400,34401,34402,34403,34404,34405,34406,34407,34408,34409,34410,34411,34412,34413,34414,34415,34416,34417,34418,34419,34420,34421,34422,34423,34424,34425,34426,34427,34428,34429,34430,34431,34432,34433,34434,34435,34436,34437,34438,34439,34440,34441,34442,34443,34444,34445,34446,34447,34448,34449,34450,34451,34452,34453,34454,34455,34456,34457,34458,34459,34460,34461,34462,34463,34464,34465,34466,34467,34468,34469,34470,34471,34472,34473,34474,34475,34476,34477,34478,34479,34480,34481,34482,34483,34484,34485,34486,34487,34488,34489,34490,34491,34492,34493,34494,34495,34496,34497,34498,34499,34500,34501,34502,34503,34504,34505,34506,34507,34508,34509,34510,34511,34512,34513,34514,34515,34516,34517,34518,34519,34520,34521,34522,34523,34524,34525,34526,34527,34528,34529,34530,34531,34532,34533,34534,34535,34536,34537,34538,34539,34540,34541,34542,34543,34544,34545,34546,34547,34548,34549,34550,34551,34552,34553,34554,34555,34556,34557,34558,34559,34560,34561,34562,34563,34564,34565,34566,34567,34568,34569,34570,34571,34572,34573,34574,34575,34576,34577,34578,34579,34580,34581,34582,34583,34584,34585,34586,34587,34588,34589,34590,34591,34592,34593,34594,34595,34596,34597,34598,34599,34600,34601,34602,34603,34604,34605,34606,34607,34608,34609,34610,34611,34612,34613,34614,34615,34616,34617,34618,34619,34620,34621,34622,34623,34624,34625,34626,34627,34628,34629,34630,34631,34632,34633,34634,34635,34636,34637,34638,34639,34640,34641,34642,34643,34644,34645,34646,34647,34648,34649,34650,34651,34652,34653,34654,34655,34656,34657,34658,34659,34660,34661,34662,34663,34664,34665,34666,34667,34668,34669,34670,34671,34672,34673,34674,34675,34676,34677,34678,34679,34680,34681,34682,34683,34684,34685,34686,34687,34688,34689,34690,34691,34692,34693,34694,34695,34696,34697,34698,34699,34700,34701,34702,34703,34704,34705,34706,34707,34708,34709,34710,34711,34712,34713,34714,34715,34716,34717,34718,34719,34720,34721,34722,34723,34724,34725,34726,34727,34728,34729,34730,34731,34732,34733,34734,34735,34736,34737,34738,34739,34740,34741,34742,34743,34744,34745,34746,34747,34748,34749,34750,34751,34752,34753,34754,34755,34756,34757,34758,34759,34760,34761,34762,34763,34764,34765,34766,34767,34768,34769,34770,34771,34772,34773,34774,34775,34776,34777,34778,34779,34780,34781,34782,34783,34784,34785,34786,34787,34788,34789,34790,34791,34792,34793,34794,34795,34796,34797,34798,34799,34800,34801,34802,34803,34804,34805,34806,34807,34808,34809,34810,34811,34812,34813,34814,34815,34816,34817,34818,34819,34820,34821,34822,34823,34824,34825,34826,34827,34828,34829,34830,34831,34832,34833,34834,34835,34836,34837,34838,34839,34840,34841,34842,34843,34844,34845,34846,34847,34848,34849,34850,34851,34852,34853,34854,34855,34856,34857,34858,34859,34860,34861,34862,34863,34864,34865,34866,34867,34868,34869,34870,34871,34872,34873,34874,34875,34876,34877,34878,34879,34880,34881,34882,34883,34884,34885,34886,34887,34888,34889,34890,34891,34892,34893,34894,34895,34896,34897,34898,34899,34900,34901,34902,34903,34904,34905,34906,34907,34908,34909,34910,34911,34912,34913,34914,34915,34916,34917,34918,34919,34920,34921,34922,34923,34924,34925,34926,34927,34928,34929,34930,34931,34932,34933,34934,34935,34936,34937,34938,34939,34940,34941,34942,34943,34944,34945,34946,34947,34948,34949,34950,34951,34952,34953,34954,34955,34956,34957,34958,34959,34960,34961,34962,34963,34964,34965,34966,34967,34968,34969,34970,34971,34972,34973,34974,34975,34976,34977,34978,34979,34980,34981,34982,34983,34984,34985,34986,34987,34988,34989,34990,34991,34992,34993,34994,34995,34996,34997,34998,34999,35000,35001,35002,35003,35004,35005,35006,35007,35008,35009,35010,35011,35012,35013,35014,35015,35016,35017,35018,35019,35020,35021,35022,35023,35024,35025,35026,35027,35028,35029,35030,35031,35032,35033,35034,35035,35036,35037,35038,35039,35040,35041,35042,35043,35044,35045,35046,35047,35048,35049,35050,35051,35052,35053,35054,35055,35056,35057,35058,35059,35060,35061,35062,35063,35064,35066,35067,35068,35069,35070,35071,35072,35073,35074,35075,35076,35077,35078,35079,35080,35081,35082,35083,35084,35085,35086,35087,35088,35089,35090,35091,35092,35093,35094,35095,35096,35097,35098,35099,35100,35101,35102,35103,35104,35105,35106,35107,35108,35109,35110,35111,35112,35113,35114,35115,35116,35117,35118,35119,35120,35121,35122,35123,35124,35125,35126,35127,35128,35129,35130,35131,35132,35133,35134,35135,35136,35137,35138,35139,35140,35141,35142,35143,35144,35145,35146,35147,35148,35149,35150,35151,35152,35153,35154,35155,35156,35157,35158,35159,35160,35161,35162,35163,35164,35165,35166,35167,35168,35169,35170,35171,35172,35173,35174,35175,35176,35177,35178,35179,35180,35181,35182,35183,35184,35185,35186,35187,35188,35189,35190,35191,35192,35193,35194,35195,35196,35197,35198,35199,35200,35201,35202,35203,35204,35205,35206,35207,35208,35209,35210,35211,35212,35213,35214,35215,35216,35217,35218,35219,35220,35221,35222,35223,35224,35225,35226,35227,35228,35229,35230,35231,35232,35233,35234,35235,35236,35237,35238,35239,35240,35241,35242,35243,35244,35245,35246,35247,35248,35249,35250,35251,35252,35253,35254,35255,35256,35257,35258,35259,35260,35261,35262,35263,35264,35265,35266,35267,35268,35269,35270,35271,35272,35273,35274,35275,35276,35277,35278,35279,35280,35281,35282,35283,35284,35285,35286,35287,35288,35289,35290,35291,35292,35293,35294,35295,35296,35297,35298,35299,35300,35301,35302,35303,35304,35305,35306,35307,35308,35309,35310,35311,35312,35313,35314,35315,35316,35317,35318,35319,35320,35321,35322,35323,35324,35325,35326,35327,35328,35329,35330,35331,35332,35333,35334,35335,35336,35337,35338,35339,35340,35341,35342,35343,35344,35345,35346,35347,35348,35349,35350,35351,35352,35353,35354,35355,35356,35357,35358,35359,35360,35361,35362,35363,35364,35365,35366,35367,35368,35369,35370,35371,35372,35373,35374,35375,35376,35377,35378,35379,35380,35381,35382,35383,35384,35385,35386,35387,35388,35389,35390,35391,35392,35393,35394,35395,35396,35397,35398,35399,35400,35401,35402,35403,35404,35405,35406,35407,35408,35409,35410,35411,35412,35413,35414,35415,35416,35417,35418,35419,35420,35421,35422,35423,35424,35425,35426,35427,35428,35429,35430,35431,35432,35433,35434,35435,35436,35437,35438,35439,35440,35441,35442,35443,35444,35445,35446,35447,35448,35449,35450,35451,35452,35453,35454,35455,35456,35457,35458,35459,35460,35461,35462,35463,35464,35465,35466,35467,35468,35469,35470,35471,35472,35473,35474,35475,35476,35477,35478,35479,35480,35481,35482,35483,35484,55393,55394,55395,55396,55397,55398,55399,55400,55401,55402,55403,55404,55405,55406,55407,55408,55409,55410,55411,55412,55413,55414,55415,55416,55417,55418,55419,55420,55421,55422,55423,55424,55425,55426,55427,55428,55429,55430,55431,55432,55433,55434,55435,55436,55437,55438,55439,55440,55441,55442,55443,55444,55445,55446,55447,55448,55449,55450,55451,55452,55453,55454,55455,55456,55457,55458,55459,55460,55461,55462,55463,55464,55465,55466,55467,55468,55469,55470,55471,55472,55473,55474,55475,55476,55477,55478,55479,55480,55481,55482,55483,55484,55485,55486,55487,55488,55489,55490,55491,55492,55493,55494,55495,55496,55497,55498,55499,55500,55501,55502,55503,55504,55505,55506,55507,55508,55509,55510,55511,55512,55513,55514,55515,55516,55517,55518,55519,55520,55521,55522,55523,55524,55525,55526,55527,55528,55529,55530,55531,55532,55533,55534,55535,55536,55537,55538,55539,55540,55541,55542,55543,55544,55545,55546,55547,55548,55549,55550,55551,55552,55553,55554,55555,55556,55557,55558,55559,55560,55561,55562,55563,55564,55565,55566,55567,55568,55569,55570,55571,55574,55575,55576,55577,55578,55579,55580,55581,55582,55583,55584,55585,55586,55587,55588,55589,55590,55591,55592,55593,55594,55595,55596,55597,55598,55599,55600,55601,55602,55604,55605,55606,55607,55608,55609,55610,55611,55612,55613,55614,55615,55616,55617,55618,55619,55620,55621,55622,55623,55624,55625,55626,55627,55628,55629,55630,55631,55632,55633,55634,55635,55636,55637,55638,55639,55640,55641,55642,55643,55644,55645,55646,55647,55648,55649,55650,55651,55652,55653,55654,55655,55656,55657,55658,55659,55660,55661,55662,55663,55664,55665,55666,55667,55668,55669,55670,55671,55672,55673,55675,55676,55677,55678,55679,55680,55681,55682,55683,55684,55685,55686,55687,55688,55689,55690,55691,55692,55693,55694,55695,55696,55697,55698,55699,55700,55701,55702,55703,55704,55705,55706,55707,55708,55709,55710,55711,55712,55713,55714,55715,55716,55717,55718,55719,55720,55721,55722,55723,55724,55725,55726,55727,55728,55729,55732,55733,55734,55735,55736,55737,55738,55739,55740,55741,55742,55743,55744,55745,55746,55747,55748,55749,55750,55751,55752,55753,55754,55755,55756,55757,55758,55759,55760,55761,55762,55763,55764,55765,55766,55767,55768,55769,55770,55771,55772,55773,55774,55775,55776,55777,55778,55779,55780,55781,55782,55783,55784,55785,55786,55787,55788,55789,55790,55791,55792,55793,55794,55795,55796,55797,55798,55799,55800,55801,55802,55803,55804,55805,55806,55807,55808,55809,55810,55811,55812,55813,55814,55815,55816,55817,55818,55819,55820,55821,55822,55823,55824,55825,55826,55827,55828,55829,55830,55831,55832,55833,55834,55835,55836,55837,55838,55839,55840,55841,55842,55843,55844,55845,55846,55847,55848,55849,55850,55851,55852,55853,55854,55855,55856,55857,55858,55859,55860,55861,55862,55863,55864,55865,55866,55867,55868,55869,55870,55871,55872,55873,55874,55875,55876,55877,55878,55879,55880,55881,55882,55883,55884,55885,55886,55887,55888,55889,55890,55891,55892,55893,55894,55895,55896,55897,55898,55899,55900,55901,55902,55903,55904,55905,55906,55907,55908,55909,55910,55911,55912,55913,55914,55915,55916,55917,55918,55919,55920,55921,55922,55923,55924,55925,55926,55927,55928,55929,55930,55931,55932,55933,55934,55935,55936,55937,55938,55939,55940,55941,55942,55943,55944,55945,55946,55947,55948,55949,55950,55951,55952,55953,55954,55955,55956,55957,55958,55959,55960,55961,55962,55963,55964,55965,55966,55967,55968,55969,55970,55971,55972,55973,55974,55975,55976,55977,55978,55979,55980,55981,55982,559[...];[ Date: 2024-02-21 11:44:58 ]
19 31s654ms SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 5 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 6 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 7 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 8 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 9 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 10 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 11 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id;[ Date: 2024-02-21 20:19:28 ]
20 31s11ms SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 5 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 6 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 7 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 8 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 9 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 10 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 11 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39));[ Date: 2024-02-21 20:18:25 ]
Time consuming queries (N)
Rank Total duration Times executed Min duration Max duration Avg duration Query 1 47m54s 7,714 120ms 1s628ms 372ms select "bus_bus".id from "bus_bus" where (("bus_bus"."create_date" > ?) and ("bus_bus"."channel" in (...))) order by "bus_bus"."id";Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Feb 21 00 117 41s733ms 356ms 01 67 22s791ms 340ms 02 101 35s19ms 346ms 03 61 21s46ms 345ms 04 110 38s653ms 351ms 05 105 34s438ms 327ms 06 100 34s157ms 341ms 07 83 28s654ms 345ms 08 62 26s868ms 433ms 09 133 48s583ms 365ms 10 70 25s298ms 361ms 11 101 31s627ms 313ms 12 172 49s830ms 289ms 13 757 4m32s 359ms 14 592 3m8s 318ms 15 593 5m21s 541ms 16 453 3m22s 447ms 17 621 5m13s 504ms 18 696 4m27s 384ms 19 722 5m24s 449ms 20 1,559 6m33s 252ms 21 345 2m4s 359ms 22 47 12s630ms 268ms 23 47 14s123ms 300ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-02-21 17:28:24') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1016"', '["pointspring_master","calendar.alarm",19554]', '["pointspring_master","mail.channel",162]', '["pointspring_master","mail.channel",163]', '["pointspring_master","mail.channel",164]', '["pointspring_master","mail.channel",165]', '["pointspring_master","mail.channel",166]', '["pointspring_master","mail.channel",167]', '["pointspring_master","res.partner",19554]', '["pointspring_master","ir.needaction",19554]'))) ORDER BY "bus_bus"."id";
Date: 2024-02-21 17:29:15 Duration: 1s628ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-02-21 17:28:24') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1001"', '["pointspring_master","calendar.alarm",19539]', '["pointspring_master","mail.channel",59]', '["pointspring_master","mail.channel",60]', '["pointspring_master","mail.channel",248]', '["pointspring_master","mail.channel",252]', '["pointspring_master","mail.channel",340]', '["pointspring_master","mail.channel",442]', '["pointspring_master","mail.channel",449]', '["pointspring_master","mail.channel",453]', '["pointspring_master","mail.channel",476]', '["pointspring_master","mail.channel",485]', '["pointspring_master","mail.channel",487]', '["pointspring_master","mail.channel",496]', '["pointspring_master","mail.channel",497]', '["pointspring_master","mail.channel",512]', '["pointspring_master","mail.channel",530]', '["pointspring_master","mail.channel",557]', '["pointspring_master","mail.channel",558]', '["pointspring_master","mail.channel",559]', '["pointspring_master","mail.channel",581]', '["pointspring_master","res.partner",19539]', '["pointspring_master","ir.needaction",19539]'))) ORDER BY "bus_bus"."id";
Date: 2024-02-21 17:29:15 Duration: 1s578ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-02-21 15:49:53') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",50343]', '["pointspring_master","mail.channel",459]', '["pointspring_master","mail.channel",533]', '["pointspring_master","mail.channel",534]', '["pointspring_master","mail.channel",603]', '["pointspring_master","mail.channel",604]', '["pointspring_master","res.partner",50343]', '["pointspring_master","ir.needaction",50343]'))) ORDER BY "bus_bus"."id";
Date: 2024-02-21 15:50:45 Duration: 1s557ms
2 44m1s 3,182 793ms 1s710ms 830ms select "sale_history_line".id from "sale_history_line" where ((((((("sale_history_line"."invoice_date" >= ?) and ("sale_history_line"."invoice_date" < ?)) and (("sale_history_line"."invoice_date" >= ?) and ("sale_history_line"."invoice_date" < ?))) and (("sale_history_line"."invoice_date" >= ?) and ("sale_history_line"."invoice_date" < ?))) and ("sale_history_line"."contact_name" = ?)) and ("sale_history_line"."invoice_number" = ?)) and ("sale_history_line"."user_id" in ( select "res_users".id from "res_users" left join "res_partner" AS "res_users__partner_id" on ("res_users"."partner_id" = "res_users__partner_id"."id") where (unaccent ("res_users__partner_id"."name"::text) ilike unaccent (?)) and (("res_users"."share" is null or "res_users"."share" = false) or exists ( select ? from "res_company_users_rel" AS "res_users__company_ids" where "res_users__company_ids"."user_id" = "res_users".id and "res_users__company_ids"."cid" in (...))) and (((("res_users__partner_id"."partner_share" is null or "res_users__partner_id"."partner_share" = false) or ("res_users__partner_id"."company_id" in (...))) or "res_users__partner_id"."company_id" is null) and (((("res_users__partner_id"."type" != ?) or "res_users__partner_id"."type" is null) or "res_users__partner_id"."type" is null) or ("res_users__partner_id"."type" = ?)))))) order by "sale_history_line"."invoice_date" desc;Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Feb 21 20 646 9m1s 838ms 21 2,536 34m59s 828ms -
SELECT "sale_history_line".id FROM "sale_history_line" WHERE ((((((("sale_history_line"."invoice_date" >= '2023-01-01') AND ("sale_history_line"."invoice_date" < '2024-01-01')) AND (("sale_history_line"."invoice_date" >= '2023-08-01') AND ("sale_history_line"."invoice_date" < '2023-09-01'))) AND (("sale_history_line"."invoice_date" >= '2023-08-29') AND ("sale_history_line"."invoice_date" < '2023-08-30'))) AND ("sale_history_line"."contact_name" = 'Tesone Transport Inc.')) AND ("sale_history_line"."invoice_number" = 'I-INV-10686')) AND ("sale_history_line"."user_id" in ( SELECT "res_users".id FROM "res_users" LEFT JOIN "res_partner" AS "res_users__partner_id" ON ("res_users"."partner_id" = "res_users__partner_id"."id") WHERE (unaccent ("res_users__partner_id"."name"::text) ilike unaccent ('%ken k%')) AND (("res_users"."share" IS NULL or "res_users"."share" = false) OR EXISTS ( SELECT 1 FROM "res_company_users_rel" AS "res_users__company_ids" WHERE "res_users__company_ids"."user_id" = "res_users".id AND "res_users__company_ids"."cid" IN (1))) AND (((("res_users__partner_id"."partner_share" IS NULL or "res_users__partner_id"."partner_share" = false) OR ("res_users__partner_id"."company_id" in (1))) OR "res_users__partner_id"."company_id" IS NULL) AND (((("res_users__partner_id"."type" != 'private') OR "res_users__partner_id"."type" IS NULL) OR "res_users__partner_id"."type" IS NULL) OR ("res_users__partner_id"."type" = 'private')))))) ORDER BY "sale_history_line"."invoice_date" DESC;
Date: 2024-02-21 21:19:23 Duration: 1s710ms
-
SELECT "sale_history_line".id FROM "sale_history_line" WHERE ((((((("sale_history_line"."invoice_date" >= '2023-01-01') AND ("sale_history_line"."invoice_date" < '2024-01-01')) AND (("sale_history_line"."invoice_date" >= '2023-05-01') AND ("sale_history_line"."invoice_date" < '2023-06-01'))) AND (("sale_history_line"."invoice_date" >= '2023-05-17') AND ("sale_history_line"."invoice_date" < '2023-05-18'))) AND ("sale_history_line"."contact_name" = 'Heidelberg Materials Northeast LLC')) AND ("sale_history_line"."invoice_number" = 'I-INV-07076')) AND ("sale_history_line"."user_id" in ( SELECT "res_users".id FROM "res_users" LEFT JOIN "res_partner" AS "res_users__partner_id" ON ("res_users"."partner_id" = "res_users__partner_id"."id") WHERE (unaccent ("res_users__partner_id"."name"::text) ilike unaccent ('%ken k%')) AND (("res_users"."share" IS NULL or "res_users"."share" = false) OR EXISTS ( SELECT 1 FROM "res_company_users_rel" AS "res_users__company_ids" WHERE "res_users__company_ids"."user_id" = "res_users".id AND "res_users__company_ids"."cid" IN (1))) AND (((("res_users__partner_id"."partner_share" IS NULL or "res_users__partner_id"."partner_share" = false) OR ("res_users__partner_id"."company_id" in (1))) OR "res_users__partner_id"."company_id" IS NULL) AND (((("res_users__partner_id"."type" != 'private') OR "res_users__partner_id"."type" IS NULL) OR "res_users__partner_id"."type" IS NULL) OR ("res_users__partner_id"."type" = 'private')))))) ORDER BY "sale_history_line"."invoice_date" DESC;
Date: 2024-02-21 21:10:02 Duration: 1s640ms
-
SELECT "sale_history_line".id FROM "sale_history_line" WHERE ((((((("sale_history_line"."invoice_date" >= '2023-01-01') AND ("sale_history_line"."invoice_date" < '2024-01-01')) AND (("sale_history_line"."invoice_date" >= '2023-04-01') AND ("sale_history_line"."invoice_date" < '2023-05-01'))) AND (("sale_history_line"."invoice_date" >= '2023-04-18') AND ("sale_history_line"."invoice_date" < '2023-04-19'))) AND ("sale_history_line"."contact_name" = 'Zarin Truck & Automotive Inc.')) AND ("sale_history_line"."invoice_number" = 'I-INV-05887')) AND ("sale_history_line"."user_id" in ( SELECT "res_users".id FROM "res_users" LEFT JOIN "res_partner" AS "res_users__partner_id" ON ("res_users"."partner_id" = "res_users__partner_id"."id") WHERE (unaccent ("res_users__partner_id"."name"::text) ilike unaccent ('%ken k%')) AND (("res_users"."share" IS NULL or "res_users"."share" = false) OR EXISTS ( SELECT 1 FROM "res_company_users_rel" AS "res_users__company_ids" WHERE "res_users__company_ids"."user_id" = "res_users".id AND "res_users__company_ids"."cid" IN (1))) AND (((("res_users__partner_id"."partner_share" IS NULL or "res_users__partner_id"."partner_share" = false) OR ("res_users__partner_id"."company_id" in (1))) OR "res_users__partner_id"."company_id" IS NULL) AND (((("res_users__partner_id"."type" != 'private') OR "res_users__partner_id"."type" IS NULL) OR "res_users__partner_id"."type" IS NULL) OR ("res_users__partner_id"."type" = 'private')))))) ORDER BY "sale_history_line"."invoice_date" DESC;
Date: 2024-02-21 21:07:02 Duration: 1s636ms
3 37m59s 3,352 598ms 2s222ms 679ms select product_product.id from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") left join "ir_translation" AS "product_product__product_tmpl_id__name" on ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" and "product_product__product_tmpl_id__name"."type" = ? and "product_product__product_tmpl_id__name"."name" = ? and "product_product__product_tmpl_id__name"."lang" = ? and "product_product__product_tmpl_id__name"."value" != ?) where ((("product_product"."active" = true) and (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent (?)) or (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) or unaccent (coalesce("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent (?))) and ("product_product__product_tmpl_id"."sale_ok" is not null and "product_product__product_tmpl_id"."sale_ok" != false)) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null) order by product_product.default_code, product_product.condensed_internal_ref;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Feb 21 03 4 2s494ms 623ms 11 20 12s751ms 637ms 12 258 2m48s 651ms 13 418 4m41s 673ms 14 458 5m14s 686ms 15 524 6m 688ms 16 308 3m28s 677ms 17 240 2m41s 671ms 18 305 3m25s 675ms 19 302 3m26s 683ms 20 200 2m26s 733ms 21 232 2m37s 679ms 22 83 53s74ms 639ms -
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%g25170%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%g25170-%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%g25170-%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 15:50:46 Duration: 2s222ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%s19%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%s-19%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%s-19%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 15:25:37 Duration: 1s905ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%s191%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%s-191%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%s-191%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 15:25:37 Duration: 1s785ms
4 35m12s 904 1s454ms 3m20s 2s337ms delete from account_move_line where id in (...);Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Feb 21 12 2 10s742ms 5s371ms 13 412 14m51s 2s162ms 14 476 13m 1s638ms 15 2 1m54s 57s401ms 16 1 1s518ms 1s518ms 17 2 4m33s 2m16s 18 3 15s26ms 5s8ms 19 2 13s582ms 6s791ms 20 2 7s833ms 3s916ms 21 1 3s116ms 3s116ms 23 1 1s513ms 1s513ms -
DELETE FROM account_move_line WHERE id IN (4247560, 4247561, 4247562, 4247563, 4247564, 4247565, 4247566, 4247567, 4247568, 4247569, 4247570, 4247571, 4247572, 4247573, 4247574, 4247575, 4247576, 4247577, 4247578, 4247579, 4247580, 4247581, 4247582, 4247583, 4247584, 4247585, 4247586, 4247587, 4247588, 4247589, 4247590, 4247591, 4247592, 4247593, 4247594, 4247595, 4247596, 4247597, 4247598, 4247599, 4247600, 4247601, 4247602, 4247603, 4247604, 4247605, 4247606, 4247607, 4247608, 4247609, 4247610, 4247611, 4247612, 4247613, 4247614, 4247615, 4247616, 4247617, 4247618, 4247619, 4247620, 4247621, 4247622, 4247623, 4247624, 4247625, 4247626, 4247627, 4247628, 4247629, 4247630, 4247631, 4247632, 4247633, 4247634, 4247635, 4247636, 4247637, 4247638, 4247639, 4247640, 4247641, 4247642, 4247643, 4247644, 4247645, 4247646, 4247647, 4247648, 4247649, 4247650, 4247651, 4247652, 4247653, 4247654, 4247655, 4247656, 4247657, 4247658, 4247659, 4247660, 4247661, 4247662, 4247663, 4247664, 4247665, 4247666, 4247667, 4247668, 4247669, 4247670, 4247671, 4247672, 4247673, 4247674, 4247675, 4247676, 4247677, 4247678, 4247679, 4247680, 4247681, 4247682, 4247683, 4247684, 4247685, 4247686, 4247687, 4247688, 4247689);
Date: 2024-02-21 13:30:46 Duration: 3m20s
-
DELETE FROM account_move_line WHERE id IN (4253825, 4253826, 4253827, 4253828, 4253829, 4253830, 4253831, 4253832, 4253833, 4253834, 4253835, 4253836, 4253837, 4253838, 4253839, 4253840, 4253841, 4253842, 4253843, 4253844, 4253845, 4253846, 4253847, 4253848, 4253849, 4253850, 4253851, 4253852, 4253853, 4253854, 4253855, 4253856, 4253857, 4253858, 4253859, 4253860, 4253861, 4253862, 4253863, 4253864, 4253865, 4253866, 4253867, 4253868, 4253869, 4253870, 4253871, 4253872, 4253873, 4253874, 4253875, 4253876, 4253877, 4253878, 4253879, 4253880, 4253881, 4253882, 4253883, 4253884, 4253885, 4253886, 4253887, 4253888, 4253889, 4253890, 4253891, 4253892, 4253893, 4253894, 4253895, 4253896, 4253897, 4253898, 4253899, 4253900, 4253901, 4253902, 4253903, 4253904, 4253905, 4253906, 4253907, 4253908, 4253909, 4253910, 4253911, 4253912, 4253913, 4253914, 4253915, 4253916, 4253917, 4253918, 4253919, 4253920, 4253921, 4253922, 4253923, 4253924, 4253925, 4253926, 4253927, 4253928, 4253929, 4253930, 4253931, 4253932, 4253933, 4253934, 4253935, 4253936, 4253937, 4253938, 4253939, 4253940, 4253941, 4253942, 4253943, 4253944, 4253945, 4253946, 4253947, 4253948, 4253949, 4253950, 4253951, 4253952, 4253953, 4253954);
Date: 2024-02-21 17:44:30 Duration: 3m16s
-
DELETE FROM account_move_line WHERE id IN (4253649, 4253650, 4253651, 4253652, 4253653, 4253654, 4253655, 4253656, 4253657, 4253658, 4253659, 4253660, 4253661, 4253662, 4253663, 4253664, 4253665, 4253666, 4253667, 4253668, 4253669, 4253670, 4253671, 4253672, 4253673, 4253674, 4253675, 4253676, 4253677, 4253678, 4253679, 4253680, 4253681, 4253682, 4253683, 4253684, 4253685, 4253686, 4253687, 4253688, 4253689, 4253690, 4253691, 4253692, 4253693, 4253694, 4253695, 4253696, 4253697, 4253698, 4253699);
Date: 2024-02-21 17:31:11 Duration: 1m17s
5 15m51s 2,620 337ms 1s397ms 363ms select "ir_attachment".id from "ir_attachment" where (("ir_attachment"."res_field" is null and (unaccent ("ir_attachment"."url"::text) like unaccent (?))) and (not ((unaccent ("ir_attachment"."url"::text) like unaccent (?))))) order by "ir_attachment"."id" desc;Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Feb 21 00 3 1s15ms 338ms 02 3 1s19ms 339ms 03 1 375ms 375ms 08 12 4s66ms 338ms 09 13 4s724ms 363ms 10 21 7s326ms 348ms 11 43 14s859ms 345ms 12 198 1m8s 347ms 13 302 1m49s 363ms 14 379 2m17s 363ms 15 248 1m28s 357ms 16 276 1m37s 352ms 17 227 1m21s 358ms 18 312 1m52s 359ms 19 221 1m20s 362ms 20 227 1m34s 416ms 21 124 43s743ms 352ms 22 10 3s432ms 343ms -
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-9ded8a0/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-21 17:54:22 Duration: 1s397ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.report_assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-210dda0/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-21 15:25:35 Duration: 906ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.report_assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-210dda0/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-21 13:14:32 Duration: 873ms
6 14m11s 55 631ms 31s11ms 15s478ms select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...));Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Feb 21 20 55 14m11s 15s478ms -
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 5 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 6 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 7 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 8 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 9 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 10 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 11 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39));
Date: 2024-02-21 20:18:25 Duration: 31s11ms
-
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 5 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 6 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 7 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 8 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 9 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 10 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 11 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39));
Date: 2024-02-21 20:18:28 Duration: 30s219ms
-
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 5 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 6 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 7 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 8 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 9 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 10 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 11 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39));
Date: 2024-02-21 20:17:58 Duration: 29s683ms
7 11m13s 33 793ms 32s372ms 20s409ms select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id;Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Feb 21 20 33 11m13s 20s409ms -
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 5 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 6 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 7 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 8 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 9 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 10 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 11 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id;
Date: 2024-02-21 20:19:57 Duration: 32s372ms
-
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 5 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 6 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 7 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 8 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 9 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 10 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 11 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id;
Date: 2024-02-21 20:20:00 Duration: 32s255ms
-
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 5 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 6 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 7 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 8 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 9 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 10 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 11 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id;
Date: 2024-02-21 20:19:28 Duration: 31s654ms
8 10m2s 210 2s512ms 4s624ms 2s869ms select "customer_product_report".id from "customer_product_report" where ("customer_product_report"."partner_id" in (...)) order by "customer_product_report"."id";Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Feb 21 15 6 15s975ms 2s662ms 16 18 47s841ms 2s657ms 17 2 5s248ms 2s624ms 18 2 5s399ms 2s699ms 20 182 8m48s 2s902ms -
SELECT "customer_product_report".id FROM "customer_product_report" WHERE ("customer_product_report"."partner_id" in (46623)) ORDER BY "customer_product_report"."id";
Date: 2024-02-21 20:11:37 Duration: 4s624ms
-
SELECT "customer_product_report".id FROM "customer_product_report" WHERE ("customer_product_report"."partner_id" in (42208, 42207, 42210)) ORDER BY "customer_product_report"."id";
Date: 2024-02-21 20:19:46 Duration: 4s468ms
-
SELECT "customer_product_report".id FROM "customer_product_report" WHERE ("customer_product_report"."partner_id" in (41313, 41312, 41315)) ORDER BY "customer_product_report"."id";
Date: 2024-02-21 20:19:41 Duration: 4s181ms
9 9m39s 680 783ms 2s146ms 851ms select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."is_core" is null or "product_template"."is_core" = false) and (("product_template"."type" in (...)) and (((((unaccent ("product_template"."default_code"::text) ilike unaccent (?)) or ("product_template"."id" in ( select "product_product"."product_tmpl_id" from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") where (("product_product"."active" = true) and (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null)))) or unaccent (coalesce("product_template__name"."value", "product_template"."name")) ilike unaccent (?)) or false) or (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent (?)))))) and (("product_template"."company_id" in (...)) or "product_template"."company_id" is null) order by coalesce("product_template__name"."value", "product_template"."name") limit ?;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Feb 21 00 1 808ms 808ms 11 3 2s448ms 816ms 12 29 23s795ms 820ms 13 93 1m18s 841ms 14 74 1m2s 848ms 15 64 54s756ms 855ms 16 105 1m27s 837ms 17 50 42s437ms 848ms 18 110 1m33s 852ms 19 80 1m8s 857ms 20 50 45s97ms 901ms 21 20 17s769ms 888ms 23 1 805ms 805ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."is_core" IS NULL or "product_template"."is_core" = false) AND (("product_template"."type" in ('consu', 'product')) AND (((((unaccent ("product_template"."default_code"::text) ilike unaccent ('%m807005%')) OR ("product_template"."id" IN ( SELECT "product_product"."product_tmpl_id" FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") WHERE (("product_product"."active" = true) AND (unaccent ("product_product"."default_code"::text) ilike unaccent ('%m807005%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL)))) OR unaccent (COALESCE("product_template__name"."value", "product_template"."name")) ilike unaccent ('%m807005%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%m807005%')))))) AND (("product_template"."company_id" in (1)) OR "product_template"."company_id" IS NULL) ORDER BY COALESCE("product_template__name"."value", "product_template"."name") LIMIT 80;
Date: 2024-02-21 15:50:46 Duration: 2s146ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."is_core" IS NULL or "product_template"."is_core" = false) AND (("product_template"."type" in ('consu', 'product')) AND (((((unaccent ("product_template"."default_code"::text) ilike unaccent ('%sfpec40est-r%')) OR ("product_template"."id" IN ( SELECT "product_product"."product_tmpl_id" FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") WHERE (("product_product"."active" = true) AND (unaccent ("product_product"."default_code"::text) ilike unaccent ('%sfpec40est-r%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL)))) OR unaccent (COALESCE("product_template__name"."value", "product_template"."name")) ilike unaccent ('%sfpec40est-r%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%sfpec40est-r%')))))) AND (("product_template"."company_id" in (1)) OR "product_template"."company_id" IS NULL) ORDER BY COALESCE("product_template__name"."value", "product_template"."name") LIMIT 80;
Date: 2024-02-21 21:15:18 Duration: 1s561ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."is_core" IS NULL or "product_template"."is_core" = false) AND (("product_template"."type" in ('consu', 'product')) AND (((((unaccent ("product_template"."default_code"::text) ilike unaccent ('%345-681%')) OR ("product_template"."id" IN ( SELECT "product_product"."product_tmpl_id" FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") WHERE (("product_product"."active" = true) AND (unaccent ("product_product"."default_code"::text) ilike unaccent ('%345-681%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL)))) OR unaccent (COALESCE("product_template__name"."value", "product_template"."name")) ilike unaccent ('%345-681%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%345-681%')))))) AND (("product_template"."company_id" in (1)) OR "product_template"."company_id" IS NULL) ORDER BY COALESCE("product_template__name"."value", "product_template"."name") LIMIT 80;
Date: 2024-02-21 19:34:41 Duration: 1s528ms
10 9m10s 808 622ms 1s622ms 680ms select product_product.id from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") left join "ir_translation" AS "product_product__product_tmpl_id__name" on ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" and "product_product__product_tmpl_id__name"."type" = ? and "product_product__product_tmpl_id__name"."name" = ? and "product_product__product_tmpl_id__name"."lang" = ? and "product_product__product_tmpl_id__name"."value" != ?) where (((("product_product"."active" = true) and (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent (?)) or (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) or unaccent (coalesce("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent (?))) and ("product_product__product_tmpl_id"."type" in (...))) and ("product_product__product_tmpl_id"."company_id" is null or ("product_product__product_tmpl_id"."company_id" = ?))) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null) order by product_product.default_code, product_product.condensed_internal_ref;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Feb 21 17 142 1m35s 669ms 18 317 3m35s 680ms 19 252 2m51s 679ms 20 97 1m8s 703ms -
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%esiiax4709%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%esii-ax4709%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%esii-ax4709%'))) AND ("product_product__product_tmpl_id"."type" in ('product', 'consu'))) AND ("product_product__product_tmpl_id"."company_id" IS NULL OR ("product_product__product_tmpl_id"."company_id" = 1))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 18:16:51 Duration: 1s622ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%esiiax4709k%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%esii-ax4709k%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%esii-ax4709k%'))) AND ("product_product__product_tmpl_id"."type" in ('product', 'consu'))) AND ("product_product__product_tmpl_id"."company_id" IS NULL OR ("product_product__product_tmpl_id"."company_id" = 1))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 18:16:52 Duration: 1s509ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%enp4%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%enp4%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%enp4%'))) AND ("product_product__product_tmpl_id"."type" in ('product', 'consu'))) AND ("product_product__product_tmpl_id"."company_id" IS NULL OR ("product_product__product_tmpl_id"."company_id" = 1))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 19:50:11 Duration: 1s147ms
11 7m23s 1,361 120ms 695ms 325ms select "forecasted_data".id from "forecasted_data" where ("forecasted_data"."item_supply_plan_id" in (...)) order by "forecasted_data"."id";Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Feb 21 15 28 5s975ms 213ms 16 8 1s695ms 211ms 17 2 360ms 180ms 18 54 12s283ms 227ms 19 1 319ms 319ms 20 350 1m45s 301ms 21 918 5m16s 345ms -
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."item_supply_plan_id" in (35584, 34574)) ORDER BY "forecasted_data"."id";
Date: 2024-02-21 21:16:49 Duration: 695ms
-
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."item_supply_plan_id" in (35584, 34574)) ORDER BY "forecasted_data"."id";
Date: 2024-02-21 21:10:01 Duration: 684ms
-
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."item_supply_plan_id" in (35801)) ORDER BY "forecasted_data"."id";
Date: 2024-02-21 21:10:01 Duration: 669ms
12 7m22s 1 7m22s 7m22s 7m22s copy public.mail_tracking_value (id, field, field_desc, field_type, old_value_integer, old_value_float, old_value_monetary, old_value_char, old_value_text, old_value_datetime, new_value_integer, new_value_float, new_value_monetary, new_value_char, new_value_text, new_value_datetime, mail_message_id, tracking_sequence, create_uid, create_date, write_uid, write_date) to stdout;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Feb 21 09 1 7m22s 7m22s -
COPY public.mail_tracking_value (id, field, field_desc, field_type, old_value_integer, old_value_float, old_value_monetary, old_value_char, old_value_text, old_value_datetime, new_value_integer, new_value_float, new_value_monetary, new_value_char, new_value_text, new_value_datetime, mail_message_id, tracking_sequence, create_uid, create_date, write_uid, write_date) TO stdout;
Date: 2024-02-21 09:12:32 Duration: 7m22s
13 7m4s 833 135ms 4s873ms 509ms update "stock_move" set "state" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Feb 21 11 3 957ms 319ms 12 39 20s797ms 533ms 13 64 33s804ms 528ms 14 76 32s384ms 426ms 15 65 30s173ms 464ms 16 60 23s390ms 389ms 17 54 25s494ms 472ms 18 203 1m45s 517ms 19 142 1m18s 552ms 20 81 53s827ms 664ms 21 40 18s279ms 456ms 22 6 1s703ms 283ms -
UPDATE "stock_move" SET "state" = 'confirmed', "write_uid" = 1010, "write_date" = (now() at time zone 'UTC') WHERE id IN (822788, 822789, 822790, 822791, 822792, 822793, 822794, 822795, 822798, 822799, 822800, 822801);
Date: 2024-02-21 12:36:37 Duration: 4s873ms
-
UPDATE "stock_move" SET "state" = 'waiting', "write_uid" = 1038, "write_date" = (now() at time zone 'UTC') WHERE id IN (824653, 824654, 824655, 824656, 824657, 824658, 824659, 824660);
Date: 2024-02-21 20:40:43 Duration: 4s696ms
-
UPDATE "stock_move" SET "state" = 'waiting', "write_uid" = 1003, "write_date" = (now() at time zone 'UTC') WHERE id IN (823180, 823181, 823182, 823183, 823184);
Date: 2024-02-21 15:09:15 Duration: 3s926ms
14 6m57s 30 630ms 25s503ms 13s915ms select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...)));Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Feb 21 20 30 6m57s 13s915ms -
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 5 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 6 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 7 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 8 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 9 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 10 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 11 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1)));
Date: 2024-02-21 20:15:05 Duration: 25s503ms
-
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 5 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 6 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 7 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 8 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 9 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 10 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 11 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1)));
Date: 2024-02-21 20:15:30 Duration: 24s992ms
-
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 5 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 6 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 7 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 8 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 9 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 10 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 11 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1)));
Date: 2024-02-21 20:21:06 Duration: 24s560ms
15 6m50s 460 170ms 12s681ms 892ms update "stock_move" set "current_warehouse_qty" = ?.?, "date" = ?, "is_done" = true, "state" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Feb 21 10 5 3s404ms 680ms 11 3 2s11ms 670ms 12 10 7s630ms 763ms 13 63 52s659ms 835ms 14 79 1m6s 837ms 15 44 37s192ms 845ms 16 26 31s196ms 1s199ms 17 27 22s177ms 821ms 18 68 1m17s 1s141ms 19 55 44s976ms 817ms 20 43 34s808ms 809ms 21 35 28s693ms 819ms 22 2 2s135ms 1s67ms -
UPDATE "stock_move" SET "current_warehouse_qty" = 2.0, "date" = '2024-02-21 18:05:09', "is_done" = true, "state" = 'done', "write_uid" = 991, "write_date" = (now() at time zone 'UTC') WHERE id IN (809856, 809857, 809859, 809860, 809861, 809862, 809863, 809864, 809865, 809866, 809849, 809850, 809851, 809852, 809853, 809854, 809855);
Date: 2024-02-21 18:05:27 Duration: 12s681ms
-
UPDATE "stock_move" SET "current_warehouse_qty" = 2.0, "date" = '2024-02-21 16:51:59', "is_done" = true, "state" = 'done', "write_uid" = 964, "write_date" = (now() at time zone 'UTC') WHERE id IN (809792, 809793, 809794, 809795, 809796, 809797, 809798, 809799, 809800, 809801, 809802, 809788, 809789, 809790, 809791);
Date: 2024-02-21 16:52:15 Duration: 10s810ms
-
UPDATE "stock_move" SET "current_warehouse_qty" = 1.0, "date" = '2024-02-21 18:24:49', "is_done" = true, "state" = 'done', "write_uid" = 991, "write_date" = (now() at time zone 'UTC') WHERE id IN (814216, 814217, 814215);
Date: 2024-02-21 18:24:56 Duration: 2s755ms
16 6m20s 574 266ms 4s106ms 662ms update "stock_move" set "current_warehouse_qty" = ?.?, "date" = ?, "state" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Feb 21 12 10 5s441ms 544ms 13 12 7s522ms 626ms 14 32 35s424ms 1s107ms 15 15 10s66ms 671ms 16 55 51s300ms 932ms 17 49 29s801ms 608ms 18 162 1m34s 584ms 19 156 1m30s 580ms 20 68 43s968ms 646ms 21 15 11s750ms 783ms -
UPDATE "stock_move" SET "current_warehouse_qty" = 5.0, "date" = '2024-02-21 16:51:22', "state" = 'done', "write_uid" = 1007, "write_date" = (now() at time zone 'UTC') WHERE id IN (819712, 819713, 819714, 819715, 819716);
Date: 2024-02-21 16:51:27 Duration: 4s106ms
-
UPDATE "stock_move" SET "current_warehouse_qty" = 5.0, "date" = '2024-02-21 16:50:59', "state" = 'done', "write_uid" = 1007, "write_date" = (now() at time zone 'UTC') WHERE id IN (819712, 819713, 819714, 819715, 819716);
Date: 2024-02-21 16:51:03 Duration: 3s621ms
-
UPDATE "stock_move" SET "current_warehouse_qty" = 5.0, "date" = '2024-02-21 16:51:10', "state" = 'done', "write_uid" = 1007, "write_date" = (now() at time zone 'UTC') WHERE id IN (819712, 819713, 819714, 819715, 819716);
Date: 2024-02-21 16:51:15 Duration: 3s494ms
17 6m12s 545 613ms 1s645ms 683ms select product_product.id from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") left join "ir_translation" AS "product_product__product_tmpl_id__name" on ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" and "product_product__product_tmpl_id__name"."type" = ? and "product_product__product_tmpl_id__name"."name" = ? and "product_product__product_tmpl_id__name"."lang" = ? and "product_product__product_tmpl_id__name"."value" != ?) where (("product_product"."active" = true) and (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent (?)) or (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) or unaccent (coalesce("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent (?))) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null) order by product_product.default_code, product_product.condensed_internal_ref;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Feb 21 12 57 37s434ms 656ms 13 80 58s313ms 728ms 14 31 21s71ms 679ms 15 26 16s988ms 653ms 16 59 39s172ms 663ms 17 15 9s769ms 651ms 18 140 1m36s 692ms 19 66 43s159ms 653ms 20 13 9s737ms 749ms 21 58 39s781ms 685ms -
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%20rl%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%20rl%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%20rl%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 13:14:33 Duration: 1s645ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%20rls%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%20rls%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%20rls%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 13:14:33 Duration: 1s634ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%20r%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%20r%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%20r%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 13:14:32 Duration: 1s533ms
18 5m29s 794 133ms 6s248ms 415ms update "stock_quant" set "quantity" = ?.?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Feb 21 10 2 488ms 244ms 11 1 449ms 449ms 12 7 2s562ms 366ms 13 29 11s912ms 410ms 14 60 25s789ms 429ms 15 32 13s703ms 428ms 16 64 41s186ms 643ms 17 53 19s926ms 375ms 18 248 1m45s 423ms 19 179 1m6s 371ms 20 90 34s367ms 381ms 21 29 7s886ms 271ms -
UPDATE "stock_quant" SET "quantity" = 2.0, "write_uid" = 964, "write_date" = (now() at time zone 'UTC') WHERE id IN (429891, 357981, 28645, 28485, 28649, 429900, 28751, 28431, 250609, 28755, 250613, 28727, 28279, 28733);
Date: 2024-02-21 16:52:21 Duration: 6s248ms
-
UPDATE "stock_quant" SET "quantity" = 2.0, "write_uid" = 991, "write_date" = (now() at time zone 'UTC') WHERE id IN (326659, 150916, 41059, 150918, 41161, 431658, 350059, 41163, 249233, 320530, 40947, 320533, 41085);
Date: 2024-02-21 18:05:34 Duration: 5s377ms
-
UPDATE "stock_quant" SET "quantity" = 6.0, "write_uid" = 1003, "write_date" = (now() at time zone 'UTC') WHERE id IN (431513, 2506, 301036, 253533);
Date: 2024-02-21 14:24:51 Duration: 1s787ms
19 5m26s 630 138ms 3s305ms 518ms update "stock_quant" set "quantity" = ?.?, "reserved_quantity" = ?.?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Feb 21 10 17 8s748ms 514ms 11 4 1s572ms 393ms 12 13 6s813ms 524ms 13 83 44s937ms 541ms 14 120 1m2s 520ms 15 71 37s593ms 529ms 16 55 28s139ms 511ms 17 31 14s897ms 480ms 18 77 38s606ms 501ms 19 50 25s407ms 508ms 20 54 29s159ms 539ms 21 52 25s717ms 494ms 22 3 2s393ms 797ms -
UPDATE "stock_quant" SET "quantity" = 0.0, "reserved_quantity" = 0.0, "write_uid" = 1038, "write_date" = (now() at time zone 'UTC') WHERE id IN (432075, 438478, 433361, 434548, 434773, 436788, 432219, 431933);
Date: 2024-02-21 20:41:31 Duration: 3s305ms
-
UPDATE "stock_quant" SET "quantity" = 0.0, "reserved_quantity" = 0.0, "write_uid" = 961, "write_date" = (now() at time zone 'UTC') WHERE id IN (438213, 438214, 438215, 438217, 438219, 438618);
Date: 2024-02-21 21:01:25 Duration: 2s573ms
-
UPDATE "stock_quant" SET "quantity" = 2.0, "reserved_quantity" = 0.0, "write_uid" = 980, "write_date" = (now() at time zone 'UTC') WHERE id IN (38847, 425676, 316661, 423583);
Date: 2024-02-21 14:59:08 Duration: 1s817ms
20 5m20s 18 783ms 25s389ms 17s795ms select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id;Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Feb 21 20 18 5m20s 17s795ms -
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 5 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 6 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 7 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 8 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 9 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 10 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 11 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id;
Date: 2024-02-21 20:54:19 Duration: 25s389ms
-
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 5 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 6 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 7 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 8 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 9 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 10 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 11 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id;
Date: 2024-02-21 20:40:24 Duration: 25s34ms
-
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 5 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 6 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 7 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 8 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 9 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 10 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 11 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id;
Date: 2024-02-21 20:40:48 Duration: 24s534ms
Most frequent queries (N)
Rank Times executed Total duration Min duration Max duration Avg duration Query 1 7,714 47m54s 120ms 1s628ms 372ms select "bus_bus".id from "bus_bus" where (("bus_bus"."create_date" > ?) and ("bus_bus"."channel" in (...))) order by "bus_bus"."id";Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Feb 21 00 117 41s733ms 356ms 01 67 22s791ms 340ms 02 101 35s19ms 346ms 03 61 21s46ms 345ms 04 110 38s653ms 351ms 05 105 34s438ms 327ms 06 100 34s157ms 341ms 07 83 28s654ms 345ms 08 62 26s868ms 433ms 09 133 48s583ms 365ms 10 70 25s298ms 361ms 11 101 31s627ms 313ms 12 172 49s830ms 289ms 13 757 4m32s 359ms 14 592 3m8s 318ms 15 593 5m21s 541ms 16 453 3m22s 447ms 17 621 5m13s 504ms 18 696 4m27s 384ms 19 722 5m24s 449ms 20 1,559 6m33s 252ms 21 345 2m4s 359ms 22 47 12s630ms 268ms 23 47 14s123ms 300ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-02-21 17:28:24') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1016"', '["pointspring_master","calendar.alarm",19554]', '["pointspring_master","mail.channel",162]', '["pointspring_master","mail.channel",163]', '["pointspring_master","mail.channel",164]', '["pointspring_master","mail.channel",165]', '["pointspring_master","mail.channel",166]', '["pointspring_master","mail.channel",167]', '["pointspring_master","res.partner",19554]', '["pointspring_master","ir.needaction",19554]'))) ORDER BY "bus_bus"."id";
Date: 2024-02-21 17:29:15 Duration: 1s628ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-02-21 17:28:24') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1001"', '["pointspring_master","calendar.alarm",19539]', '["pointspring_master","mail.channel",59]', '["pointspring_master","mail.channel",60]', '["pointspring_master","mail.channel",248]', '["pointspring_master","mail.channel",252]', '["pointspring_master","mail.channel",340]', '["pointspring_master","mail.channel",442]', '["pointspring_master","mail.channel",449]', '["pointspring_master","mail.channel",453]', '["pointspring_master","mail.channel",476]', '["pointspring_master","mail.channel",485]', '["pointspring_master","mail.channel",487]', '["pointspring_master","mail.channel",496]', '["pointspring_master","mail.channel",497]', '["pointspring_master","mail.channel",512]', '["pointspring_master","mail.channel",530]', '["pointspring_master","mail.channel",557]', '["pointspring_master","mail.channel",558]', '["pointspring_master","mail.channel",559]', '["pointspring_master","mail.channel",581]', '["pointspring_master","res.partner",19539]', '["pointspring_master","ir.needaction",19539]'))) ORDER BY "bus_bus"."id";
Date: 2024-02-21 17:29:15 Duration: 1s578ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-02-21 15:49:53') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",50343]', '["pointspring_master","mail.channel",459]', '["pointspring_master","mail.channel",533]', '["pointspring_master","mail.channel",534]', '["pointspring_master","mail.channel",603]', '["pointspring_master","mail.channel",604]', '["pointspring_master","res.partner",50343]', '["pointspring_master","ir.needaction",50343]'))) ORDER BY "bus_bus"."id";
Date: 2024-02-21 15:50:45 Duration: 1s557ms
2 3,352 37m59s 598ms 2s222ms 679ms select product_product.id from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") left join "ir_translation" AS "product_product__product_tmpl_id__name" on ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" and "product_product__product_tmpl_id__name"."type" = ? and "product_product__product_tmpl_id__name"."name" = ? and "product_product__product_tmpl_id__name"."lang" = ? and "product_product__product_tmpl_id__name"."value" != ?) where ((("product_product"."active" = true) and (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent (?)) or (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) or unaccent (coalesce("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent (?))) and ("product_product__product_tmpl_id"."sale_ok" is not null and "product_product__product_tmpl_id"."sale_ok" != false)) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null) order by product_product.default_code, product_product.condensed_internal_ref;Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Feb 21 03 4 2s494ms 623ms 11 20 12s751ms 637ms 12 258 2m48s 651ms 13 418 4m41s 673ms 14 458 5m14s 686ms 15 524 6m 688ms 16 308 3m28s 677ms 17 240 2m41s 671ms 18 305 3m25s 675ms 19 302 3m26s 683ms 20 200 2m26s 733ms 21 232 2m37s 679ms 22 83 53s74ms 639ms -
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%g25170%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%g25170-%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%g25170-%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 15:50:46 Duration: 2s222ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%s19%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%s-19%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%s-19%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 15:25:37 Duration: 1s905ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%s191%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%s-191%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%s-191%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 15:25:37 Duration: 1s785ms
3 3,182 44m1s 793ms 1s710ms 830ms select "sale_history_line".id from "sale_history_line" where ((((((("sale_history_line"."invoice_date" >= ?) and ("sale_history_line"."invoice_date" < ?)) and (("sale_history_line"."invoice_date" >= ?) and ("sale_history_line"."invoice_date" < ?))) and (("sale_history_line"."invoice_date" >= ?) and ("sale_history_line"."invoice_date" < ?))) and ("sale_history_line"."contact_name" = ?)) and ("sale_history_line"."invoice_number" = ?)) and ("sale_history_line"."user_id" in ( select "res_users".id from "res_users" left join "res_partner" AS "res_users__partner_id" on ("res_users"."partner_id" = "res_users__partner_id"."id") where (unaccent ("res_users__partner_id"."name"::text) ilike unaccent (?)) and (("res_users"."share" is null or "res_users"."share" = false) or exists ( select ? from "res_company_users_rel" AS "res_users__company_ids" where "res_users__company_ids"."user_id" = "res_users".id and "res_users__company_ids"."cid" in (...))) and (((("res_users__partner_id"."partner_share" is null or "res_users__partner_id"."partner_share" = false) or ("res_users__partner_id"."company_id" in (...))) or "res_users__partner_id"."company_id" is null) and (((("res_users__partner_id"."type" != ?) or "res_users__partner_id"."type" is null) or "res_users__partner_id"."type" is null) or ("res_users__partner_id"."type" = ?)))))) order by "sale_history_line"."invoice_date" desc;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Feb 21 20 646 9m1s 838ms 21 2,536 34m59s 828ms -
SELECT "sale_history_line".id FROM "sale_history_line" WHERE ((((((("sale_history_line"."invoice_date" >= '2023-01-01') AND ("sale_history_line"."invoice_date" < '2024-01-01')) AND (("sale_history_line"."invoice_date" >= '2023-08-01') AND ("sale_history_line"."invoice_date" < '2023-09-01'))) AND (("sale_history_line"."invoice_date" >= '2023-08-29') AND ("sale_history_line"."invoice_date" < '2023-08-30'))) AND ("sale_history_line"."contact_name" = 'Tesone Transport Inc.')) AND ("sale_history_line"."invoice_number" = 'I-INV-10686')) AND ("sale_history_line"."user_id" in ( SELECT "res_users".id FROM "res_users" LEFT JOIN "res_partner" AS "res_users__partner_id" ON ("res_users"."partner_id" = "res_users__partner_id"."id") WHERE (unaccent ("res_users__partner_id"."name"::text) ilike unaccent ('%ken k%')) AND (("res_users"."share" IS NULL or "res_users"."share" = false) OR EXISTS ( SELECT 1 FROM "res_company_users_rel" AS "res_users__company_ids" WHERE "res_users__company_ids"."user_id" = "res_users".id AND "res_users__company_ids"."cid" IN (1))) AND (((("res_users__partner_id"."partner_share" IS NULL or "res_users__partner_id"."partner_share" = false) OR ("res_users__partner_id"."company_id" in (1))) OR "res_users__partner_id"."company_id" IS NULL) AND (((("res_users__partner_id"."type" != 'private') OR "res_users__partner_id"."type" IS NULL) OR "res_users__partner_id"."type" IS NULL) OR ("res_users__partner_id"."type" = 'private')))))) ORDER BY "sale_history_line"."invoice_date" DESC;
Date: 2024-02-21 21:19:23 Duration: 1s710ms
-
SELECT "sale_history_line".id FROM "sale_history_line" WHERE ((((((("sale_history_line"."invoice_date" >= '2023-01-01') AND ("sale_history_line"."invoice_date" < '2024-01-01')) AND (("sale_history_line"."invoice_date" >= '2023-05-01') AND ("sale_history_line"."invoice_date" < '2023-06-01'))) AND (("sale_history_line"."invoice_date" >= '2023-05-17') AND ("sale_history_line"."invoice_date" < '2023-05-18'))) AND ("sale_history_line"."contact_name" = 'Heidelberg Materials Northeast LLC')) AND ("sale_history_line"."invoice_number" = 'I-INV-07076')) AND ("sale_history_line"."user_id" in ( SELECT "res_users".id FROM "res_users" LEFT JOIN "res_partner" AS "res_users__partner_id" ON ("res_users"."partner_id" = "res_users__partner_id"."id") WHERE (unaccent ("res_users__partner_id"."name"::text) ilike unaccent ('%ken k%')) AND (("res_users"."share" IS NULL or "res_users"."share" = false) OR EXISTS ( SELECT 1 FROM "res_company_users_rel" AS "res_users__company_ids" WHERE "res_users__company_ids"."user_id" = "res_users".id AND "res_users__company_ids"."cid" IN (1))) AND (((("res_users__partner_id"."partner_share" IS NULL or "res_users__partner_id"."partner_share" = false) OR ("res_users__partner_id"."company_id" in (1))) OR "res_users__partner_id"."company_id" IS NULL) AND (((("res_users__partner_id"."type" != 'private') OR "res_users__partner_id"."type" IS NULL) OR "res_users__partner_id"."type" IS NULL) OR ("res_users__partner_id"."type" = 'private')))))) ORDER BY "sale_history_line"."invoice_date" DESC;
Date: 2024-02-21 21:10:02 Duration: 1s640ms
-
SELECT "sale_history_line".id FROM "sale_history_line" WHERE ((((((("sale_history_line"."invoice_date" >= '2023-01-01') AND ("sale_history_line"."invoice_date" < '2024-01-01')) AND (("sale_history_line"."invoice_date" >= '2023-04-01') AND ("sale_history_line"."invoice_date" < '2023-05-01'))) AND (("sale_history_line"."invoice_date" >= '2023-04-18') AND ("sale_history_line"."invoice_date" < '2023-04-19'))) AND ("sale_history_line"."contact_name" = 'Zarin Truck & Automotive Inc.')) AND ("sale_history_line"."invoice_number" = 'I-INV-05887')) AND ("sale_history_line"."user_id" in ( SELECT "res_users".id FROM "res_users" LEFT JOIN "res_partner" AS "res_users__partner_id" ON ("res_users"."partner_id" = "res_users__partner_id"."id") WHERE (unaccent ("res_users__partner_id"."name"::text) ilike unaccent ('%ken k%')) AND (("res_users"."share" IS NULL or "res_users"."share" = false) OR EXISTS ( SELECT 1 FROM "res_company_users_rel" AS "res_users__company_ids" WHERE "res_users__company_ids"."user_id" = "res_users".id AND "res_users__company_ids"."cid" IN (1))) AND (((("res_users__partner_id"."partner_share" IS NULL or "res_users__partner_id"."partner_share" = false) OR ("res_users__partner_id"."company_id" in (1))) OR "res_users__partner_id"."company_id" IS NULL) AND (((("res_users__partner_id"."type" != 'private') OR "res_users__partner_id"."type" IS NULL) OR "res_users__partner_id"."type" IS NULL) OR ("res_users__partner_id"."type" = 'private')))))) ORDER BY "sale_history_line"."invoice_date" DESC;
Date: 2024-02-21 21:07:02 Duration: 1s636ms
4 2,620 15m51s 337ms 1s397ms 363ms select "ir_attachment".id from "ir_attachment" where (("ir_attachment"."res_field" is null and (unaccent ("ir_attachment"."url"::text) like unaccent (?))) and (not ((unaccent ("ir_attachment"."url"::text) like unaccent (?))))) order by "ir_attachment"."id" desc;Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Feb 21 00 3 1s15ms 338ms 02 3 1s19ms 339ms 03 1 375ms 375ms 08 12 4s66ms 338ms 09 13 4s724ms 363ms 10 21 7s326ms 348ms 11 43 14s859ms 345ms 12 198 1m8s 347ms 13 302 1m49s 363ms 14 379 2m17s 363ms 15 248 1m28s 357ms 16 276 1m37s 352ms 17 227 1m21s 358ms 18 312 1m52s 359ms 19 221 1m20s 362ms 20 227 1m34s 416ms 21 124 43s743ms 352ms 22 10 3s432ms 343ms -
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-9ded8a0/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-21 17:54:22 Duration: 1s397ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.report_assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-210dda0/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-21 15:25:35 Duration: 906ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.report_assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-210dda0/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-21 13:14:32 Duration: 873ms
5 1,432 3m49s 127ms 630ms 160ms select min("account_move".id) as id, count("account_move".id) AS "debit_origin_id_count", "account_move"."debit_origin_id" AS "debit_origin_id" from "account_move" left join "account_move" AS "account_move__debit_origin_id" on ("account_move"."debit_origin_id" = "account_move__debit_origin_id"."id") where ("account_move"."debit_origin_id" in (...)) and ("account_move"."company_id" is null or ("account_move"."company_id" in (...))) group by "account_move"."debit_origin_id", "account_move__debit_origin_id"."invoice_date_due" order by "account_move__debit_origin_id"."invoice_date_due";Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Feb 21 03 1 132ms 132ms 10 12 1s814ms 151ms 11 18 2s682ms 149ms 12 51 7s807ms 153ms 13 213 33s691ms 158ms 14 229 36s718ms 160ms 15 118 19s104ms 161ms 16 170 27s565ms 162ms 17 146 22s809ms 156ms 18 142 23s760ms 167ms 19 214 34s15ms 158ms 20 53 9s607ms 181ms 21 59 9s132ms 154ms 22 6 880ms 146ms -
SELECT min("account_move".id) AS id, count("account_move".id) AS "debit_origin_id_count", "account_move"."debit_origin_id" as "debit_origin_id" FROM "account_move" LEFT JOIN "account_move" AS "account_move__debit_origin_id" ON ("account_move"."debit_origin_id" = "account_move__debit_origin_id"."id") WHERE ("account_move"."debit_origin_id" in (1221637)) AND ("account_move"."company_id" IS NULL OR ("account_move"."company_id" in (1))) GROUP BY "account_move"."debit_origin_id", "account_move__debit_origin_id"."invoice_date_due" ORDER BY "account_move__debit_origin_id"."invoice_date_due";
Date: 2024-02-21 18:46:41 Duration: 630ms
-
SELECT min("account_move".id) AS id, count("account_move".id) AS "debit_origin_id_count", "account_move"."debit_origin_id" as "debit_origin_id" FROM "account_move" LEFT JOIN "account_move" AS "account_move__debit_origin_id" ON ("account_move"."debit_origin_id" = "account_move__debit_origin_id"."id") WHERE ("account_move"."debit_origin_id" in (1220540)) AND ("account_move"."company_id" IS NULL OR ("account_move"."company_id" in (1))) GROUP BY "account_move"."debit_origin_id", "account_move__debit_origin_id"."invoice_date_due" ORDER BY "account_move__debit_origin_id"."invoice_date_due";
Date: 2024-02-21 15:46:35 Duration: 602ms
-
SELECT min("account_move".id) AS id, count("account_move".id) AS "debit_origin_id_count", "account_move"."debit_origin_id" as "debit_origin_id" FROM "account_move" LEFT JOIN "account_move" AS "account_move__debit_origin_id" ON ("account_move"."debit_origin_id" = "account_move__debit_origin_id"."id") WHERE ("account_move"."debit_origin_id" in (859736)) AND ("account_move"."company_id" IS NULL OR ("account_move"."company_id" in (1))) GROUP BY "account_move"."debit_origin_id", "account_move__debit_origin_id"."invoice_date_due" ORDER BY "account_move__debit_origin_id"."invoice_date_due";
Date: 2024-02-21 18:22:00 Duration: 581ms
6 1,361 7m23s 120ms 695ms 325ms select "forecasted_data".id from "forecasted_data" where ("forecasted_data"."item_supply_plan_id" in (...)) order by "forecasted_data"."id";Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Feb 21 15 28 5s975ms 213ms 16 8 1s695ms 211ms 17 2 360ms 180ms 18 54 12s283ms 227ms 19 1 319ms 319ms 20 350 1m45s 301ms 21 918 5m16s 345ms -
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."item_supply_plan_id" in (35584, 34574)) ORDER BY "forecasted_data"."id";
Date: 2024-02-21 21:16:49 Duration: 695ms
-
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."item_supply_plan_id" in (35584, 34574)) ORDER BY "forecasted_data"."id";
Date: 2024-02-21 21:10:01 Duration: 684ms
-
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."item_supply_plan_id" in (35801)) ORDER BY "forecasted_data"."id";
Date: 2024-02-21 21:10:01 Duration: 669ms
7 1,273 4m5s 176ms 522ms 193ms select res_partner.id from "res_partner" where ("res_partner"."active" = true) and (((("res_partner"."partner_share" is null or "res_partner"."partner_share" = false) or ("res_partner"."company_id" in (...))) or "res_partner"."company_id" is null) and (((("res_partner"."type" != ?) or "res_partner"."type" is null) or "res_partner"."type" is null) or ("res_partner"."type" = ?))) and (unaccent (res_partner.email) ilike unaccent (?) or unaccent (res_partner.display_name) ilike unaccent (?) or unaccent (res_partner.ref) ilike unaccent (?) or unaccent (res_partner.vat) ilike unaccent (?)) unaccent (res_partner.display_name);Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Feb 21 02 1 181ms 181ms 10 6 1s111ms 185ms 11 11 1s987ms 180ms 12 63 11s649ms 184ms 13 55 10s600ms 192ms 14 168 32s615ms 194ms 15 142 26s936ms 189ms 16 177 33s676ms 190ms 17 137 25s913ms 189ms 18 202 39s122ms 193ms 19 197 38s954ms 197ms 20 81 16s795ms 207ms 21 32 6s12ms 187ms 23 1 184ms 184ms -
SELECT res_partner.id FROM "res_partner" WHERE ("res_partner"."active" = true) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = false) OR ("res_partner"."company_id" in (1))) OR "res_partner"."company_id" IS NULL) AND (((("res_partner"."type" != 'private') OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL) OR ("res_partner"."type" = 'private'))) AND (unaccent (res_partner.email) ilike unaccent ('%EAST PENN%') OR unaccent (res_partner.display_name) ilike unaccent ('%EAST PENN%') OR unaccent (res_partner.ref) ilike unaccent ('%EAST PENN%') OR unaccent (res_partner.vat) ilike unaccent ('EASTPENN')) -- don't panic, trust postgres bitmap ORDER BY COALESCE(res_partner.supplier_rank, 0) DESC, unaccent (res_partner.display_name) ilike unaccent ('%EAST PENN%') desc, unaccent (res_partner.display_name);
Date: 2024-02-21 17:32:20 Duration: 522ms
-
SELECT res_partner.id FROM "res_partner" WHERE ("res_partner"."active" = true) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = false) OR ("res_partner"."company_id" in (1))) OR "res_partner"."company_id" IS NULL) AND (((("res_partner"."type" != 'private') OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL) OR ("res_partner"."type" = 'private'))) AND (unaccent (res_partner.email) ilike unaccent ('%17882%') OR unaccent (res_partner.display_name) ilike unaccent ('%17882%') OR unaccent (res_partner.ref) ilike unaccent ('%17882%') OR unaccent (res_partner.vat) ilike unaccent ('17882')) -- don't panic, trust postgres bitmap ORDER BY unaccent (res_partner.display_name) ilike unaccent ('%17882%') desc, unaccent (res_partner.display_name);
Date: 2024-02-21 19:06:38 Duration: 512ms
-
SELECT res_partner.id FROM "res_partner" WHERE ("res_partner"."active" = true) AND (((("res_partner"."partner_share" IS NULL or "res_partner"."partner_share" = false) OR ("res_partner"."company_id" in (1))) OR "res_partner"."company_id" IS NULL) AND (((("res_partner"."type" != 'private') OR "res_partner"."type" IS NULL) OR "res_partner"."type" IS NULL) OR ("res_partner"."type" = 'private'))) AND (unaccent (res_partner.email) ilike unaccent ('%WESCON%') OR unaccent (res_partner.display_name) ilike unaccent ('%WESCON%') OR unaccent (res_partner.ref) ilike unaccent ('%WESCON%') OR unaccent (res_partner.vat) ilike unaccent ('WESCON')) -- don't panic, trust postgres bitmap ORDER BY unaccent (res_partner.display_name) ilike unaccent ('%WESCON%') desc, unaccent (res_partner.display_name);
Date: 2024-02-21 19:57:39 Duration: 338ms
8 1,187 4m39s 120ms 601ms 235ms select "product_warehouse_inventory".id from "product_warehouse_inventory" where ("product_warehouse_inventory"."product_id" in (...)) order by "product_warehouse_inventory"."warehouse_name";Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Feb 21 13 1 128ms 128ms 15 15 2s212ms 147ms 16 23 3s214ms 139ms 17 6 879ms 146ms 18 69 10s647ms 154ms 19 8 1s199ms 149ms 20 347 1m12s 210ms 21 718 3m8s 262ms -
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (173002, 172998, 172945, 172938, 172926, 172911)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-02-21 21:10:01 Duration: 601ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (177397, 177419)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-02-21 21:16:23 Duration: 569ms
-
SELECT "product_warehouse_inventory".id FROM "product_warehouse_inventory" WHERE ("product_warehouse_inventory"."product_id" in (181348, 181349, 181401, 181334)) ORDER BY "product_warehouse_inventory"."warehouse_name";
Date: 2024-02-21 21:16:23 Duration: 555ms
9 1,058 3m11s 155ms 634ms 180ms select min("sale_report".id) as id, count("sale_report".id) AS "product_id_count", sum("sale_report"."product_uom_qty") AS "product_uom_qty", "sale_report"."product_id" AS "product_id" from "sale_report" left join "product_product" AS "sale_report__product_id" on ("sale_report"."product_id" = "sale_report__product_id"."id") left join "product_template" AS "sale_report__product_id__product_tmpl_id" on ("sale_report__product_id"."product_tmpl_id" = "sale_report__product_id__product_tmpl_id"."id") left join "ir_translation" AS "sale_report__product_id__product_tmpl_id__name" on ("sale_report__product_id__product_tmpl_id"."id" = "sale_report__product_id__product_tmpl_id__name"."res_id" and "sale_report__product_id__product_tmpl_id__name"."type" = ? and "sale_report__product_id__product_tmpl_id__name"."name" = ? and "sale_report__product_id__product_tmpl_id__name"."lang" = ? and "sale_report__product_id__product_tmpl_id__name"."value" != ?) where ((("sale_report"."state" in (...)) and ("sale_report"."product_id" in (...))) and ("sale_report"."date" >= ?)) and ("sale_report"."company_id" is null or ("sale_report"."company_id" in (...))) group by "sale_report"."product_id", "sale_report__product_id"."default_code", coalesce("sale_report__product_id__product_tmpl_id__name"."value", "sale_report__product_id__product_tmpl_id"."name"), "sale_report__product_id"."id" order by "sale_report__product_id"."default_code", coalesce("sale_report__product_id__product_tmpl_id__name"."value", "sale_report__product_id__product_tmpl_id"."name"), "sale_report__product_id"."id";Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Feb 21 00 2 317ms 158ms 03 2 324ms 162ms 11 4 704ms 176ms 12 52 9s429ms 181ms 13 98 17s393ms 177ms 14 114 20s655ms 181ms 15 110 19s213ms 174ms 16 147 26s121ms 177ms 17 74 12s581ms 170ms 18 141 26s760ms 189ms 19 159 27s941ms 175ms 20 98 19s802ms 202ms 21 55 9s525ms 173ms 22 1 157ms 157ms 23 1 162ms 162ms -
SELECT min("sale_report".id) AS id, count("sale_report".id) AS "product_id_count", sum("sale_report"."product_uom_qty") AS "product_uom_qty", "sale_report"."product_id" as "product_id" FROM "sale_report" LEFT JOIN "product_product" AS "sale_report__product_id" ON ("sale_report"."product_id" = "sale_report__product_id"."id") LEFT JOIN "product_template" AS "sale_report__product_id__product_tmpl_id" ON ("sale_report__product_id"."product_tmpl_id" = "sale_report__product_id__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "sale_report__product_id__product_tmpl_id__name" ON ("sale_report__product_id__product_tmpl_id"."id" = "sale_report__product_id__product_tmpl_id__name"."res_id" AND "sale_report__product_id__product_tmpl_id__name"."type" = 'model' AND "sale_report__product_id__product_tmpl_id__name"."name" = 'product.template,name' AND "sale_report__product_id__product_tmpl_id__name"."lang" = 'en_US' AND "sale_report__product_id__product_tmpl_id__name"."value" != '') WHERE ((("sale_report"."state" in ('sale', 'done', 'paid')) AND ("sale_report"."product_id" in (204631))) AND ("sale_report"."date" >= '2023-02-21 00:00:00')) AND ("sale_report"."company_id" IS NULL OR ("sale_report"."company_id" in (1))) GROUP BY "sale_report"."product_id", "sale_report__product_id"."default_code", COALESCE("sale_report__product_id__product_tmpl_id__name"."value", "sale_report__product_id__product_tmpl_id"."name"), "sale_report__product_id"."id" ORDER BY "sale_report__product_id"."default_code", COALESCE("sale_report__product_id__product_tmpl_id__name"."value", "sale_report__product_id__product_tmpl_id"."name"), "sale_report__product_id"."id";
Date: 2024-02-21 12:48:22 Duration: 634ms
-
SELECT min("sale_report".id) AS id, count("sale_report".id) AS "product_id_count", sum("sale_report"."product_uom_qty") AS "product_uom_qty", "sale_report"."product_id" as "product_id" FROM "sale_report" LEFT JOIN "product_product" AS "sale_report__product_id" ON ("sale_report"."product_id" = "sale_report__product_id"."id") LEFT JOIN "product_template" AS "sale_report__product_id__product_tmpl_id" ON ("sale_report__product_id"."product_tmpl_id" = "sale_report__product_id__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "sale_report__product_id__product_tmpl_id__name" ON ("sale_report__product_id__product_tmpl_id"."id" = "sale_report__product_id__product_tmpl_id__name"."res_id" AND "sale_report__product_id__product_tmpl_id__name"."type" = 'model' AND "sale_report__product_id__product_tmpl_id__name"."name" = 'product.template,name' AND "sale_report__product_id__product_tmpl_id__name"."lang" = 'en_US' AND "sale_report__product_id__product_tmpl_id__name"."value" != '') WHERE ((("sale_report"."state" in ('sale', 'done', 'paid')) AND ("sale_report"."product_id" in (206325))) AND ("sale_report"."date" >= '2023-02-21 00:00:00')) AND ("sale_report"."company_id" IS NULL OR ("sale_report"."company_id" in (1))) GROUP BY "sale_report"."product_id", "sale_report__product_id"."default_code", COALESCE("sale_report__product_id__product_tmpl_id__name"."value", "sale_report__product_id__product_tmpl_id"."name"), "sale_report__product_id"."id" ORDER BY "sale_report__product_id"."default_code", COALESCE("sale_report__product_id__product_tmpl_id__name"."value", "sale_report__product_id__product_tmpl_id"."name"), "sale_report__product_id"."id";
Date: 2024-02-21 18:13:21 Duration: 580ms
-
SELECT min("sale_report".id) AS id, count("sale_report".id) AS "product_id_count", sum("sale_report"."product_uom_qty") AS "product_uom_qty", "sale_report"."product_id" as "product_id" FROM "sale_report" LEFT JOIN "product_product" AS "sale_report__product_id" ON ("sale_report"."product_id" = "sale_report__product_id"."id") LEFT JOIN "product_template" AS "sale_report__product_id__product_tmpl_id" ON ("sale_report__product_id"."product_tmpl_id" = "sale_report__product_id__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "sale_report__product_id__product_tmpl_id__name" ON ("sale_report__product_id__product_tmpl_id"."id" = "sale_report__product_id__product_tmpl_id__name"."res_id" AND "sale_report__product_id__product_tmpl_id__name"."type" = 'model' AND "sale_report__product_id__product_tmpl_id__name"."name" = 'product.template,name' AND "sale_report__product_id__product_tmpl_id__name"."lang" = 'en_US' AND "sale_report__product_id__product_tmpl_id__name"."value" != '') WHERE ((("sale_report"."state" in ('sale', 'done', 'paid')) AND ("sale_report"."product_id" in (177018))) AND ("sale_report"."date" >= '2023-02-21 00:00:00')) AND ("sale_report"."company_id" IS NULL OR ("sale_report"."company_id" in (1))) GROUP BY "sale_report"."product_id", "sale_report__product_id"."default_code", COALESCE("sale_report__product_id__product_tmpl_id__name"."value", "sale_report__product_id__product_tmpl_id"."name"), "sale_report__product_id"."id" ORDER BY "sale_report__product_id"."default_code", COALESCE("sale_report__product_id__product_tmpl_id__name"."value", "sale_report__product_id__product_tmpl_id"."name"), "sale_report__product_id"."id";
Date: 2024-02-21 18:24:56 Duration: 535ms
10 964 2m18s 130ms 400ms 143ms update "stock_quant" set "reserved_quantity" = ?.?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Feb 21 10 1 135ms 135ms 11 4 546ms 136ms 12 66 9s312ms 141ms 13 94 13s766ms 146ms 14 113 16s166ms 143ms 15 125 17s612ms 140ms 16 108 15s321ms 141ms 17 55 7s790ms 141ms 18 133 19s70ms 143ms 19 96 14s17ms 146ms 20 80 11s977ms 149ms 21 76 10s890ms 143ms 22 13 1s777ms 136ms -
UPDATE "stock_quant" SET "reserved_quantity" = 1.0, "write_uid" = 953, "write_date" = (now() at time zone 'UTC') WHERE id IN (431219);
Date: 2024-02-21 19:28:13 Duration: 400ms
-
UPDATE "stock_quant" SET "reserved_quantity" = 1.0, "write_uid" = 990, "write_date" = (now() at time zone 'UTC') WHERE id IN (438206, 418815);
Date: 2024-02-21 13:14:34 Duration: 384ms
-
UPDATE "stock_quant" SET "reserved_quantity" = 1.0, "write_uid" = 990, "write_date" = (now() at time zone 'UTC') WHERE id IN (438206, 418815);
Date: 2024-02-21 13:11:00 Duration: 272ms
11 927 2m11s 129ms 204ms 141ms update product_warehouse_inventory set sft_stk_qty = ? where id = ( select id from product_warehouse_inventory where product_id = (?) and warehouse_id = (?));Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Feb 21 14 8 1s125ms 140ms 15 151 21s391ms 141ms 16 128 18s171ms 141ms 17 214 29s844ms 139ms 18 156 21s884ms 140ms 19 131 18s416ms 140ms 20 100 15s45ms 150ms 21 39 5s479ms 140ms -
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (221975) and warehouse_id = (46));
Date: 2024-02-21 20:18:00 Duration: 204ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (223569) and warehouse_id = (46));
Date: 2024-02-21 20:18:01 Duration: 201ms
-
update product_warehouse_inventory set sft_stk_qty = 0 where id = ( select id from product_warehouse_inventory where product_id = (223799) and warehouse_id = (46));
Date: 2024-02-21 20:18:00 Duration: 199ms
12 904 35m12s 1s454ms 3m20s 2s337ms delete from account_move_line where id in (...);Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Feb 21 12 2 10s742ms 5s371ms 13 412 14m51s 2s162ms 14 476 13m 1s638ms 15 2 1m54s 57s401ms 16 1 1s518ms 1s518ms 17 2 4m33s 2m16s 18 3 15s26ms 5s8ms 19 2 13s582ms 6s791ms 20 2 7s833ms 3s916ms 21 1 3s116ms 3s116ms 23 1 1s513ms 1s513ms -
DELETE FROM account_move_line WHERE id IN (4247560, 4247561, 4247562, 4247563, 4247564, 4247565, 4247566, 4247567, 4247568, 4247569, 4247570, 4247571, 4247572, 4247573, 4247574, 4247575, 4247576, 4247577, 4247578, 4247579, 4247580, 4247581, 4247582, 4247583, 4247584, 4247585, 4247586, 4247587, 4247588, 4247589, 4247590, 4247591, 4247592, 4247593, 4247594, 4247595, 4247596, 4247597, 4247598, 4247599, 4247600, 4247601, 4247602, 4247603, 4247604, 4247605, 4247606, 4247607, 4247608, 4247609, 4247610, 4247611, 4247612, 4247613, 4247614, 4247615, 4247616, 4247617, 4247618, 4247619, 4247620, 4247621, 4247622, 4247623, 4247624, 4247625, 4247626, 4247627, 4247628, 4247629, 4247630, 4247631, 4247632, 4247633, 4247634, 4247635, 4247636, 4247637, 4247638, 4247639, 4247640, 4247641, 4247642, 4247643, 4247644, 4247645, 4247646, 4247647, 4247648, 4247649, 4247650, 4247651, 4247652, 4247653, 4247654, 4247655, 4247656, 4247657, 4247658, 4247659, 4247660, 4247661, 4247662, 4247663, 4247664, 4247665, 4247666, 4247667, 4247668, 4247669, 4247670, 4247671, 4247672, 4247673, 4247674, 4247675, 4247676, 4247677, 4247678, 4247679, 4247680, 4247681, 4247682, 4247683, 4247684, 4247685, 4247686, 4247687, 4247688, 4247689);
Date: 2024-02-21 13:30:46 Duration: 3m20s
-
DELETE FROM account_move_line WHERE id IN (4253825, 4253826, 4253827, 4253828, 4253829, 4253830, 4253831, 4253832, 4253833, 4253834, 4253835, 4253836, 4253837, 4253838, 4253839, 4253840, 4253841, 4253842, 4253843, 4253844, 4253845, 4253846, 4253847, 4253848, 4253849, 4253850, 4253851, 4253852, 4253853, 4253854, 4253855, 4253856, 4253857, 4253858, 4253859, 4253860, 4253861, 4253862, 4253863, 4253864, 4253865, 4253866, 4253867, 4253868, 4253869, 4253870, 4253871, 4253872, 4253873, 4253874, 4253875, 4253876, 4253877, 4253878, 4253879, 4253880, 4253881, 4253882, 4253883, 4253884, 4253885, 4253886, 4253887, 4253888, 4253889, 4253890, 4253891, 4253892, 4253893, 4253894, 4253895, 4253896, 4253897, 4253898, 4253899, 4253900, 4253901, 4253902, 4253903, 4253904, 4253905, 4253906, 4253907, 4253908, 4253909, 4253910, 4253911, 4253912, 4253913, 4253914, 4253915, 4253916, 4253917, 4253918, 4253919, 4253920, 4253921, 4253922, 4253923, 4253924, 4253925, 4253926, 4253927, 4253928, 4253929, 4253930, 4253931, 4253932, 4253933, 4253934, 4253935, 4253936, 4253937, 4253938, 4253939, 4253940, 4253941, 4253942, 4253943, 4253944, 4253945, 4253946, 4253947, 4253948, 4253949, 4253950, 4253951, 4253952, 4253953, 4253954);
Date: 2024-02-21 17:44:30 Duration: 3m16s
-
DELETE FROM account_move_line WHERE id IN (4253649, 4253650, 4253651, 4253652, 4253653, 4253654, 4253655, 4253656, 4253657, 4253658, 4253659, 4253660, 4253661, 4253662, 4253663, 4253664, 4253665, 4253666, 4253667, 4253668, 4253669, 4253670, 4253671, 4253672, 4253673, 4253674, 4253675, 4253676, 4253677, 4253678, 4253679, 4253680, 4253681, 4253682, 4253683, 4253684, 4253685, 4253686, 4253687, 4253688, 4253689, 4253690, 4253691, 4253692, 4253693, 4253694, 4253695, 4253696, 4253697, 4253698, 4253699);
Date: 2024-02-21 17:31:11 Duration: 1m17s
13 848 3m22s 212ms 574ms 239ms select "sale_line_report".id from "sale_line_report" where ("sale_line_report"."real_line_id" in (...)) order by "sale_line_report"."id";Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Feb 21 03 1 223ms 223ms 11 1 303ms 303ms 12 89 19s743ms 221ms 13 57 12s946ms 227ms 14 36 8s407ms 233ms 15 43 9s938ms 231ms 16 38 8s626ms 227ms 17 31 7s124ms 229ms 18 27 6s218ms 230ms 19 33 7s916ms 239ms 20 401 1m40s 250ms 21 80 18s373ms 229ms 22 11 2s475ms 225ms -
SELECT "sale_line_report".id FROM "sale_line_report" WHERE ("sale_line_report"."real_line_id" in (341741)) ORDER BY "sale_line_report"."id";
Date: 2024-02-21 20:36:59 Duration: 574ms
-
SELECT "sale_line_report".id FROM "sale_line_report" WHERE ("sale_line_report"."real_line_id" in (340517)) ORDER BY "sale_line_report"."id";
Date: 2024-02-21 20:48:35 Duration: 379ms
-
SELECT "sale_line_report".id FROM "sale_line_report" WHERE ("sale_line_report"."real_line_id" in (340622)) ORDER BY "sale_line_report"."id";
Date: 2024-02-21 20:48:37 Duration: 379ms
14 833 7m4s 135ms 4s873ms 509ms update "stock_move" set "state" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Feb 21 11 3 957ms 319ms 12 39 20s797ms 533ms 13 64 33s804ms 528ms 14 76 32s384ms 426ms 15 65 30s173ms 464ms 16 60 23s390ms 389ms 17 54 25s494ms 472ms 18 203 1m45s 517ms 19 142 1m18s 552ms 20 81 53s827ms 664ms 21 40 18s279ms 456ms 22 6 1s703ms 283ms -
UPDATE "stock_move" SET "state" = 'confirmed', "write_uid" = 1010, "write_date" = (now() at time zone 'UTC') WHERE id IN (822788, 822789, 822790, 822791, 822792, 822793, 822794, 822795, 822798, 822799, 822800, 822801);
Date: 2024-02-21 12:36:37 Duration: 4s873ms
-
UPDATE "stock_move" SET "state" = 'waiting', "write_uid" = 1038, "write_date" = (now() at time zone 'UTC') WHERE id IN (824653, 824654, 824655, 824656, 824657, 824658, 824659, 824660);
Date: 2024-02-21 20:40:43 Duration: 4s696ms
-
UPDATE "stock_move" SET "state" = 'waiting', "write_uid" = 1003, "write_date" = (now() at time zone 'UTC') WHERE id IN (823180, 823181, 823182, 823183, 823184);
Date: 2024-02-21 15:09:15 Duration: 3s926ms
15 808 9m10s 622ms 1s622ms 680ms select product_product.id from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") left join "ir_translation" AS "product_product__product_tmpl_id__name" on ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" and "product_product__product_tmpl_id__name"."type" = ? and "product_product__product_tmpl_id__name"."name" = ? and "product_product__product_tmpl_id__name"."lang" = ? and "product_product__product_tmpl_id__name"."value" != ?) where (((("product_product"."active" = true) and (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent (?)) or (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) or unaccent (coalesce("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent (?))) and ("product_product__product_tmpl_id"."type" in (...))) and ("product_product__product_tmpl_id"."company_id" is null or ("product_product__product_tmpl_id"."company_id" = ?))) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null) order by product_product.default_code, product_product.condensed_internal_ref;Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Feb 21 17 142 1m35s 669ms 18 317 3m35s 680ms 19 252 2m51s 679ms 20 97 1m8s 703ms -
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%esiiax4709%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%esii-ax4709%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%esii-ax4709%'))) AND ("product_product__product_tmpl_id"."type" in ('product', 'consu'))) AND ("product_product__product_tmpl_id"."company_id" IS NULL OR ("product_product__product_tmpl_id"."company_id" = 1))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 18:16:51 Duration: 1s622ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%esiiax4709k%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%esii-ax4709k%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%esii-ax4709k%'))) AND ("product_product__product_tmpl_id"."type" in ('product', 'consu'))) AND ("product_product__product_tmpl_id"."company_id" IS NULL OR ("product_product__product_tmpl_id"."company_id" = 1))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 18:16:52 Duration: 1s509ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%enp4%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%enp4%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%enp4%'))) AND ("product_product__product_tmpl_id"."type" in ('product', 'consu'))) AND ("product_product__product_tmpl_id"."company_id" IS NULL OR ("product_product__product_tmpl_id"."company_id" = 1))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 19:50:11 Duration: 1s147ms
16 794 5m29s 133ms 6s248ms 415ms update "stock_quant" set "quantity" = ?.?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Feb 21 10 2 488ms 244ms 11 1 449ms 449ms 12 7 2s562ms 366ms 13 29 11s912ms 410ms 14 60 25s789ms 429ms 15 32 13s703ms 428ms 16 64 41s186ms 643ms 17 53 19s926ms 375ms 18 248 1m45s 423ms 19 179 1m6s 371ms 20 90 34s367ms 381ms 21 29 7s886ms 271ms -
UPDATE "stock_quant" SET "quantity" = 2.0, "write_uid" = 964, "write_date" = (now() at time zone 'UTC') WHERE id IN (429891, 357981, 28645, 28485, 28649, 429900, 28751, 28431, 250609, 28755, 250613, 28727, 28279, 28733);
Date: 2024-02-21 16:52:21 Duration: 6s248ms
-
UPDATE "stock_quant" SET "quantity" = 2.0, "write_uid" = 991, "write_date" = (now() at time zone 'UTC') WHERE id IN (326659, 150916, 41059, 150918, 41161, 431658, 350059, 41163, 249233, 320530, 40947, 320533, 41085);
Date: 2024-02-21 18:05:34 Duration: 5s377ms
-
UPDATE "stock_quant" SET "quantity" = 6.0, "write_uid" = 1003, "write_date" = (now() at time zone 'UTC') WHERE id IN (431513, 2506, 301036, 253533);
Date: 2024-02-21 14:24:51 Duration: 1s787ms
17 680 9m39s 783ms 2s146ms 851ms select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."is_core" is null or "product_template"."is_core" = false) and (("product_template"."type" in (...)) and (((((unaccent ("product_template"."default_code"::text) ilike unaccent (?)) or ("product_template"."id" in ( select "product_product"."product_tmpl_id" from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") where (("product_product"."active" = true) and (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null)))) or unaccent (coalesce("product_template__name"."value", "product_template"."name")) ilike unaccent (?)) or false) or (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent (?)))))) and (("product_template"."company_id" in (...)) or "product_template"."company_id" is null) order by coalesce("product_template__name"."value", "product_template"."name") limit ?;Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Feb 21 00 1 808ms 808ms 11 3 2s448ms 816ms 12 29 23s795ms 820ms 13 93 1m18s 841ms 14 74 1m2s 848ms 15 64 54s756ms 855ms 16 105 1m27s 837ms 17 50 42s437ms 848ms 18 110 1m33s 852ms 19 80 1m8s 857ms 20 50 45s97ms 901ms 21 20 17s769ms 888ms 23 1 805ms 805ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."is_core" IS NULL or "product_template"."is_core" = false) AND (("product_template"."type" in ('consu', 'product')) AND (((((unaccent ("product_template"."default_code"::text) ilike unaccent ('%m807005%')) OR ("product_template"."id" IN ( SELECT "product_product"."product_tmpl_id" FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") WHERE (("product_product"."active" = true) AND (unaccent ("product_product"."default_code"::text) ilike unaccent ('%m807005%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL)))) OR unaccent (COALESCE("product_template__name"."value", "product_template"."name")) ilike unaccent ('%m807005%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%m807005%')))))) AND (("product_template"."company_id" in (1)) OR "product_template"."company_id" IS NULL) ORDER BY COALESCE("product_template__name"."value", "product_template"."name") LIMIT 80;
Date: 2024-02-21 15:50:46 Duration: 2s146ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."is_core" IS NULL or "product_template"."is_core" = false) AND (("product_template"."type" in ('consu', 'product')) AND (((((unaccent ("product_template"."default_code"::text) ilike unaccent ('%sfpec40est-r%')) OR ("product_template"."id" IN ( SELECT "product_product"."product_tmpl_id" FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") WHERE (("product_product"."active" = true) AND (unaccent ("product_product"."default_code"::text) ilike unaccent ('%sfpec40est-r%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL)))) OR unaccent (COALESCE("product_template__name"."value", "product_template"."name")) ilike unaccent ('%sfpec40est-r%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%sfpec40est-r%')))))) AND (("product_template"."company_id" in (1)) OR "product_template"."company_id" IS NULL) ORDER BY COALESCE("product_template__name"."value", "product_template"."name") LIMIT 80;
Date: 2024-02-21 21:15:18 Duration: 1s561ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."is_core" IS NULL or "product_template"."is_core" = false) AND (("product_template"."type" in ('consu', 'product')) AND (((((unaccent ("product_template"."default_code"::text) ilike unaccent ('%345-681%')) OR ("product_template"."id" IN ( SELECT "product_product"."product_tmpl_id" FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") WHERE (("product_product"."active" = true) AND (unaccent ("product_product"."default_code"::text) ilike unaccent ('%345-681%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL)))) OR unaccent (COALESCE("product_template__name"."value", "product_template"."name")) ilike unaccent ('%345-681%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%345-681%')))))) AND (("product_template"."company_id" in (1)) OR "product_template"."company_id" IS NULL) ORDER BY COALESCE("product_template__name"."value", "product_template"."name") LIMIT 80;
Date: 2024-02-21 19:34:41 Duration: 1s528ms
18 680 1m42s 129ms 565ms 150ms select count(?) from mail_tracking_value v left join mail_message m on (v.mail_message_id = m.id) join purchase_order po on (po.id = m.res_id) where m.create_date >= ? and m.model = ? and m.message_type = ? and v.old_value_char = ? and v.new_value_char = ? and po.company_id = ?;Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Feb 21 07 2 287ms 143ms 10 1 565ms 565ms 11 5 869ms 173ms 12 27 4s318ms 159ms 13 25 4s408ms 176ms 14 26 3s917ms 150ms 15 81 12s38ms 148ms 16 120 17s127ms 142ms 17 53 7s893ms 148ms 18 83 12s952ms 156ms 19 205 30s402ms 148ms 20 17 2s470ms 145ms 21 35 4s877ms 139ms -
SELECT COUNT(1) FROM mail_tracking_value v LEFT JOIN mail_message m ON (v.mail_message_id = m.id) JOIN purchase_order po ON (po.id = m.res_id) WHERE m.create_date >= '2024-02-14 10:59:53' AND m.model = 'purchase.order' AND m.message_type = 'notification' AND v.old_value_char = 'RFQ' AND v.new_value_char = 'RFQ Sent' AND po.company_id = 1;
Date: 2024-02-21 10:59:54 Duration: 565ms
-
SELECT COUNT(1) FROM mail_tracking_value v LEFT JOIN mail_message m ON (v.mail_message_id = m.id) JOIN purchase_order po ON (po.id = m.res_id) WHERE m.create_date >= '2024-02-14 13:14:32' AND m.model = 'purchase.order' AND m.message_type = 'notification' AND v.old_value_char = 'RFQ' AND v.new_value_char = 'RFQ Sent' AND po.company_id = 1;
Date: 2024-02-21 13:14:33 Duration: 426ms
-
SELECT COUNT(1) FROM mail_tracking_value v LEFT JOIN mail_message m ON (v.mail_message_id = m.id) JOIN purchase_order po ON (po.id = m.res_id) WHERE m.create_date >= '2024-02-14 13:14:31' AND m.model = 'purchase.order' AND m.message_type = 'notification' AND v.old_value_char = 'RFQ' AND v.new_value_char = 'RFQ Sent' AND po.company_id = 1;
Date: 2024-02-21 13:14:32 Duration: 379ms
19 638 2m44s 223ms 910ms 258ms update "sale_order_line" set "invoice_status" = ?, "open_qty_fil" = ?.?, "qty_delivered" = ?, "qty_to_invoice" = ?, "untaxed_amount_to_invoice" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Feb 21 02 2 506ms 253ms 10 21 5s234ms 249ms 11 3 760ms 253ms 12 22 5s850ms 265ms 13 102 25s505ms 250ms 14 144 36s986ms 256ms 15 78 19s962ms 255ms 16 58 14s675ms 253ms 17 48 12s811ms 266ms 18 39 9s680ms 248ms 19 37 9s709ms 262ms 20 31 8s839ms 285ms 21 49 13s431ms 274ms 22 4 940ms 235ms -
UPDATE "sale_order_line" SET "invoice_status" = 'to invoice', "open_qty_fil" = 0.0, "qty_delivered" = '-4.00', "qty_to_invoice" = '-4.00', "untaxed_amount_to_invoice" = '0.00', "write_uid" = 1020, "write_date" = (now() at time zone 'UTC') WHERE id IN (344204, 344202, 344196, 344197);
Date: 2024-02-21 17:08:16 Duration: 910ms
-
UPDATE "sale_order_line" SET "invoice_status" = 'to invoice', "open_qty_fil" = 0.0, "qty_delivered" = '-6.00', "qty_to_invoice" = '-6.00', "untaxed_amount_to_invoice" = '0.00', "write_uid" = 951, "write_date" = (now() at time zone 'UTC') WHERE id IN (344465, 344469, 344470);
Date: 2024-02-21 20:55:29 Duration: 754ms
-
UPDATE "sale_order_line" SET "invoice_status" = 'to invoice', "open_qty_fil" = 0.0, "qty_delivered" = '1.00', "qty_to_invoice" = '1.00', "untaxed_amount_to_invoice" = '41.83', "write_uid" = 961, "write_date" = (now() at time zone 'UTC') WHERE id IN (344487);
Date: 2024-02-21 21:01:28 Duration: 638ms
20 630 5m26s 138ms 3s305ms 518ms update "stock_quant" set "quantity" = ?.?, "reserved_quantity" = ?.?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Feb 21 10 17 8s748ms 514ms 11 4 1s572ms 393ms 12 13 6s813ms 524ms 13 83 44s937ms 541ms 14 120 1m2s 520ms 15 71 37s593ms 529ms 16 55 28s139ms 511ms 17 31 14s897ms 480ms 18 77 38s606ms 501ms 19 50 25s407ms 508ms 20 54 29s159ms 539ms 21 52 25s717ms 494ms 22 3 2s393ms 797ms -
UPDATE "stock_quant" SET "quantity" = 0.0, "reserved_quantity" = 0.0, "write_uid" = 1038, "write_date" = (now() at time zone 'UTC') WHERE id IN (432075, 438478, 433361, 434548, 434773, 436788, 432219, 431933);
Date: 2024-02-21 20:41:31 Duration: 3s305ms
-
UPDATE "stock_quant" SET "quantity" = 0.0, "reserved_quantity" = 0.0, "write_uid" = 961, "write_date" = (now() at time zone 'UTC') WHERE id IN (438213, 438214, 438215, 438217, 438219, 438618);
Date: 2024-02-21 21:01:25 Duration: 2s573ms
-
UPDATE "stock_quant" SET "quantity" = 2.0, "reserved_quantity" = 0.0, "write_uid" = 980, "write_date" = (now() at time zone 'UTC') WHERE id IN (38847, 425676, 316661, 423583);
Date: 2024-02-21 14:59:08 Duration: 1s817ms
Normalized slowest queries (N)
Rank Min duration Max duration Avg duration Times executed Total duration Query 1 7m22s 7m22s 7m22s 1 7m22s copy public.mail_tracking_value (id, field, field_desc, field_type, old_value_integer, old_value_float, old_value_monetary, old_value_char, old_value_text, old_value_datetime, new_value_integer, new_value_float, new_value_monetary, new_value_char, new_value_text, new_value_datetime, mail_message_id, tracking_sequence, create_uid, create_date, write_uid, write_date) to stdout;Times Reported Time consuming queries #1
Day Hour Count Duration Avg duration Feb 21 09 1 7m22s 7m22s -
COPY public.mail_tracking_value (id, field, field_desc, field_type, old_value_integer, old_value_float, old_value_monetary, old_value_char, old_value_text, old_value_datetime, new_value_integer, new_value_float, new_value_monetary, new_value_char, new_value_text, new_value_datetime, mail_message_id, tracking_sequence, create_uid, create_date, write_uid, write_date) TO stdout;
Date: 2024-02-21 09:12:32 Duration: 7m22s
2 793ms 32s372ms 20s409ms 33 11m13s select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) group by account_move_line.account_id;Times Reported Time consuming queries #2
Day Hour Count Duration Avg duration Feb 21 20 33 11m13s 20s409ms -
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 5 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 6 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 7 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 8 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 9 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 10 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 11 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) GROUP BY account_move_line.account_id;
Date: 2024-02-21 20:19:57 Duration: 32s372ms
-
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 5 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 6 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 7 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 8 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 9 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 10 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 11 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id;
Date: 2024-02-21 20:20:00 Duration: 32s255ms
-
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 5 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 6 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 7 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 8 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 9 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 10 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 11 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) GROUP BY account_move_line.account_id;
Date: 2024-02-21 20:19:28 Duration: 31s654ms
3 783ms 25s389ms 17s795ms 18 5m20s select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id union all select account_move_line.account_id, ? as period_index, coalesce(sum(round(? * account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) group by account_move_line.account_id;Times Reported Time consuming queries #3
Day Hour Count Duration Avg duration Feb 21 20 18 5m20s 17s795ms -
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 5 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 6 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 7 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 8 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 9 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 10 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 11 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (41, 42))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id;
Date: 2024-02-21 20:54:19 Duration: 25s389ms
-
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 5 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 6 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 7 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 8 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 9 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 10 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 11 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id;
Date: 2024-02-21 20:40:24 Duration: 25s34ms
-
SELECT account_move_line.account_id, 0 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 1 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 2 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 3 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 4 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 5 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 6 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 7 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 8 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 9 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 10 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id UNION ALL SELECT account_move_line.account_id, 11 AS period_index, COALESCE(SUM(ROUND(1 * account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (40))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) GROUP BY account_move_line.account_id;
Date: 2024-02-21 20:40:48 Duration: 24s534ms
4 631ms 31s11ms 15s478ms 55 14m11s select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...)) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) and ("account_move_line"."branch_id" in (...));Times Reported Time consuming queries #4
Day Hour Count Duration Avg duration Feb 21 20 55 14m11s 15s478ms -
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 5 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 6 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 7 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 8 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 9 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 10 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39)) UNION ALL SELECT 11 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38, 39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (38, 39));
Date: 2024-02-21 20:18:25 Duration: 31s11ms
-
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 5 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 6 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 7 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 8 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 9 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 10 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 11 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39));
Date: 2024-02-21 20:18:28 Duration: 30s219ms
-
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 5 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 6 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 7 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 8 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 9 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 10 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39)) UNION ALL SELECT 11 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) and ("account_move_line"."branch_id" in (39));
Date: 2024-02-21 20:17:58 Duration: 29s683ms
5 630ms 25s503ms 13s915ms 30 6m57s select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...))) union all select ? as period_index, count(distinct account_move_line.account_id) as count_rows, coalesce(sum(round(account_move_line.balance * currency_table.rate, currency_table.precision)), ?.?) as balance from "account_move_line" left join "account_move" AS "account_move_line__move_id" on ("account_move_line"."move_id" = "account_move_line__move_id"."id") join ( values (?, ?.?, ?)) as currency_table (company_id, rate, precision) on currency_table.company_id = account_move_line.company_id where ((((((((("account_move_line"."display_type" not in (...)) or "account_move_line"."display_type" is null) and (("account_move_line__move_id"."state" != ?) or "account_move_line__move_id"."state" is null)) and ("account_move_line"."company_id" = ?)) and ("account_move_line"."date" <= ?)) and (("account_move_line"."date" >= ?) or ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" in ( select "account_account_type".id from "account_account_type" where ("account_account_type"."include_initial_balance" = true))) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...))))))) and ("account_move_line__move_id"."state" = ?)) and ("account_move_line"."branch_id" in (...))) and ("account_move_line"."account_id" in ( select "account_account".id from "account_account" where ("account_account"."user_type_id" = ?) and ("account_account"."company_id" is null or ("account_account"."company_id" in (...)))))) and ("account_move_line"."company_id" is null or ("account_move_line"."company_id" in (...)));Times Reported Time consuming queries #5
Day Hour Count Duration Avg duration Feb 21 20 30 6m57s 13s915ms -
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 5 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 6 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 7 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 8 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 9 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 10 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 11 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1)));
Date: 2024-02-21 20:15:05 Duration: 25s503ms
-
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 5 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 6 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 7 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 8 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 9 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 10 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 11 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (38))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 15) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1)));
Date: 2024-02-21 20:15:30 Duration: 24s992ms
-
SELECT 0 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-12-31')) AND (("account_move_line"."date" >= '2023-12-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 1 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-11-30')) AND (("account_move_line"."date" >= '2023-11-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 2 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-10-31')) AND (("account_move_line"."date" >= '2023-10-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 3 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-09-30')) AND (("account_move_line"."date" >= '2023-09-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 4 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-08-31')) AND (("account_move_line"."date" >= '2023-08-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 5 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-07-31')) AND (("account_move_line"."date" >= '2023-07-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 6 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-06-30')) AND (("account_move_line"."date" >= '2023-06-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 7 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-05-31')) AND (("account_move_line"."date" >= '2023-05-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 8 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-04-30')) AND (("account_move_line"."date" >= '2023-04-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 9 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-03-31')) AND (("account_move_line"."date" >= '2023-03-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 10 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-02-28')) AND (("account_move_line"."date" >= '2023-02-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1))) UNION ALL SELECT 11 AS period_index, COUNT(DISTINCT account_move_line.account_id) AS count_rows, COALESCE(SUM(ROUND(account_move_line.balance * currency_table.rate, currency_table.precision)), 0.0) AS balance FROM "account_move_line" LEFT JOIN "account_move" AS "account_move_line__move_id" ON ("account_move_line"."move_id" = "account_move_line__move_id"."id") JOIN ( VALUES (1, 1.0, 2)) AS currency_table (company_id, rate, precision) ON currency_table.company_id = account_move_line.company_id WHERE ((((((((("account_move_line"."display_type" not in ('line_section', 'line_note')) OR "account_move_line"."display_type" IS NULL) AND (("account_move_line__move_id"."state" != 'cancel') OR "account_move_line__move_id"."state" IS NULL)) AND ("account_move_line"."company_id" = 1)) AND ("account_move_line"."date" <= '2023-01-31')) AND (("account_move_line"."date" >= '2023-01-01') OR ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" in ( SELECT "account_account_type".id FROM "account_account_type" WHERE ("account_account_type"."include_initial_balance" = true))) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1))))))) AND ("account_move_line__move_id"."state" = 'posted')) AND ("account_move_line"."branch_id" in (39))) AND ("account_move_line"."account_id" in ( SELECT "account_account".id FROM "account_account" WHERE ("account_account"."user_type_id" = 17) AND ("account_account"."company_id" IS NULL OR ("account_account"."company_id" in (1)))))) AND ("account_move_line"."company_id" IS NULL OR ("account_move_line"."company_id" in (1)));
Date: 2024-02-21 20:21:06 Duration: 24s560ms
6 2s512ms 4s624ms 2s869ms 210 10m2s select "customer_product_report".id from "customer_product_report" where ("customer_product_report"."partner_id" in (...)) order by "customer_product_report"."id";Times Reported Time consuming queries #6
Day Hour Count Duration Avg duration Feb 21 15 6 15s975ms 2s662ms 16 18 47s841ms 2s657ms 17 2 5s248ms 2s624ms 18 2 5s399ms 2s699ms 20 182 8m48s 2s902ms -
SELECT "customer_product_report".id FROM "customer_product_report" WHERE ("customer_product_report"."partner_id" in (46623)) ORDER BY "customer_product_report"."id";
Date: 2024-02-21 20:11:37 Duration: 4s624ms
-
SELECT "customer_product_report".id FROM "customer_product_report" WHERE ("customer_product_report"."partner_id" in (42208, 42207, 42210)) ORDER BY "customer_product_report"."id";
Date: 2024-02-21 20:19:46 Duration: 4s468ms
-
SELECT "customer_product_report".id FROM "customer_product_report" WHERE ("customer_product_report"."partner_id" in (41313, 41312, 41315)) ORDER BY "customer_product_report"."id";
Date: 2024-02-21 20:19:41 Duration: 4s181ms
7 1s454ms 3m20s 2s337ms 904 35m12s delete from account_move_line where id in (...);Times Reported Time consuming queries #7
Day Hour Count Duration Avg duration Feb 21 12 2 10s742ms 5s371ms 13 412 14m51s 2s162ms 14 476 13m 1s638ms 15 2 1m54s 57s401ms 16 1 1s518ms 1s518ms 17 2 4m33s 2m16s 18 3 15s26ms 5s8ms 19 2 13s582ms 6s791ms 20 2 7s833ms 3s916ms 21 1 3s116ms 3s116ms 23 1 1s513ms 1s513ms -
DELETE FROM account_move_line WHERE id IN (4247560, 4247561, 4247562, 4247563, 4247564, 4247565, 4247566, 4247567, 4247568, 4247569, 4247570, 4247571, 4247572, 4247573, 4247574, 4247575, 4247576, 4247577, 4247578, 4247579, 4247580, 4247581, 4247582, 4247583, 4247584, 4247585, 4247586, 4247587, 4247588, 4247589, 4247590, 4247591, 4247592, 4247593, 4247594, 4247595, 4247596, 4247597, 4247598, 4247599, 4247600, 4247601, 4247602, 4247603, 4247604, 4247605, 4247606, 4247607, 4247608, 4247609, 4247610, 4247611, 4247612, 4247613, 4247614, 4247615, 4247616, 4247617, 4247618, 4247619, 4247620, 4247621, 4247622, 4247623, 4247624, 4247625, 4247626, 4247627, 4247628, 4247629, 4247630, 4247631, 4247632, 4247633, 4247634, 4247635, 4247636, 4247637, 4247638, 4247639, 4247640, 4247641, 4247642, 4247643, 4247644, 4247645, 4247646, 4247647, 4247648, 4247649, 4247650, 4247651, 4247652, 4247653, 4247654, 4247655, 4247656, 4247657, 4247658, 4247659, 4247660, 4247661, 4247662, 4247663, 4247664, 4247665, 4247666, 4247667, 4247668, 4247669, 4247670, 4247671, 4247672, 4247673, 4247674, 4247675, 4247676, 4247677, 4247678, 4247679, 4247680, 4247681, 4247682, 4247683, 4247684, 4247685, 4247686, 4247687, 4247688, 4247689);
Date: 2024-02-21 13:30:46 Duration: 3m20s
-
DELETE FROM account_move_line WHERE id IN (4253825, 4253826, 4253827, 4253828, 4253829, 4253830, 4253831, 4253832, 4253833, 4253834, 4253835, 4253836, 4253837, 4253838, 4253839, 4253840, 4253841, 4253842, 4253843, 4253844, 4253845, 4253846, 4253847, 4253848, 4253849, 4253850, 4253851, 4253852, 4253853, 4253854, 4253855, 4253856, 4253857, 4253858, 4253859, 4253860, 4253861, 4253862, 4253863, 4253864, 4253865, 4253866, 4253867, 4253868, 4253869, 4253870, 4253871, 4253872, 4253873, 4253874, 4253875, 4253876, 4253877, 4253878, 4253879, 4253880, 4253881, 4253882, 4253883, 4253884, 4253885, 4253886, 4253887, 4253888, 4253889, 4253890, 4253891, 4253892, 4253893, 4253894, 4253895, 4253896, 4253897, 4253898, 4253899, 4253900, 4253901, 4253902, 4253903, 4253904, 4253905, 4253906, 4253907, 4253908, 4253909, 4253910, 4253911, 4253912, 4253913, 4253914, 4253915, 4253916, 4253917, 4253918, 4253919, 4253920, 4253921, 4253922, 4253923, 4253924, 4253925, 4253926, 4253927, 4253928, 4253929, 4253930, 4253931, 4253932, 4253933, 4253934, 4253935, 4253936, 4253937, 4253938, 4253939, 4253940, 4253941, 4253942, 4253943, 4253944, 4253945, 4253946, 4253947, 4253948, 4253949, 4253950, 4253951, 4253952, 4253953, 4253954);
Date: 2024-02-21 17:44:30 Duration: 3m16s
-
DELETE FROM account_move_line WHERE id IN (4253649, 4253650, 4253651, 4253652, 4253653, 4253654, 4253655, 4253656, 4253657, 4253658, 4253659, 4253660, 4253661, 4253662, 4253663, 4253664, 4253665, 4253666, 4253667, 4253668, 4253669, 4253670, 4253671, 4253672, 4253673, 4253674, 4253675, 4253676, 4253677, 4253678, 4253679, 4253680, 4253681, 4253682, 4253683, 4253684, 4253685, 4253686, 4253687, 4253688, 4253689, 4253690, 4253691, 4253692, 4253693, 4253694, 4253695, 4253696, 4253697, 4253698, 4253699);
Date: 2024-02-21 17:31:11 Duration: 1m17s
8 170ms 12s681ms 892ms 460 6m50s update "stock_move" set "current_warehouse_qty" = ?.?, "date" = ?, "is_done" = true, "state" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);Times Reported Time consuming queries #8
Day Hour Count Duration Avg duration Feb 21 10 5 3s404ms 680ms 11 3 2s11ms 670ms 12 10 7s630ms 763ms 13 63 52s659ms 835ms 14 79 1m6s 837ms 15 44 37s192ms 845ms 16 26 31s196ms 1s199ms 17 27 22s177ms 821ms 18 68 1m17s 1s141ms 19 55 44s976ms 817ms 20 43 34s808ms 809ms 21 35 28s693ms 819ms 22 2 2s135ms 1s67ms -
UPDATE "stock_move" SET "current_warehouse_qty" = 2.0, "date" = '2024-02-21 18:05:09', "is_done" = true, "state" = 'done', "write_uid" = 991, "write_date" = (now() at time zone 'UTC') WHERE id IN (809856, 809857, 809859, 809860, 809861, 809862, 809863, 809864, 809865, 809866, 809849, 809850, 809851, 809852, 809853, 809854, 809855);
Date: 2024-02-21 18:05:27 Duration: 12s681ms
-
UPDATE "stock_move" SET "current_warehouse_qty" = 2.0, "date" = '2024-02-21 16:51:59', "is_done" = true, "state" = 'done', "write_uid" = 964, "write_date" = (now() at time zone 'UTC') WHERE id IN (809792, 809793, 809794, 809795, 809796, 809797, 809798, 809799, 809800, 809801, 809802, 809788, 809789, 809790, 809791);
Date: 2024-02-21 16:52:15 Duration: 10s810ms
-
UPDATE "stock_move" SET "current_warehouse_qty" = 1.0, "date" = '2024-02-21 18:24:49', "is_done" = true, "state" = 'done', "write_uid" = 991, "write_date" = (now() at time zone 'UTC') WHERE id IN (814216, 814217, 814215);
Date: 2024-02-21 18:24:56 Duration: 2s755ms
9 783ms 2s146ms 851ms 680 9m39s select "product_template".id from "product_template" left join "ir_translation" AS "product_template__name" on ("product_template"."id" = "product_template__name"."res_id" and "product_template__name"."type" = ? and "product_template__name"."name" = ? and "product_template__name"."lang" = ? and "product_template__name"."value" != ?) where (("product_template"."active" = true) and (("product_template"."is_core" is null or "product_template"."is_core" = false) and (("product_template"."type" in (...)) and (((((unaccent ("product_template"."default_code"::text) ilike unaccent (?)) or ("product_template"."id" in ( select "product_product"."product_tmpl_id" from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") where (("product_product"."active" = true) and (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null)))) or unaccent (coalesce("product_template__name"."value", "product_template"."name")) ilike unaccent (?)) or false) or (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent (?)))))) and (("product_template"."company_id" in (...)) or "product_template"."company_id" is null) order by coalesce("product_template__name"."value", "product_template"."name") limit ?;Times Reported Time consuming queries #9
Day Hour Count Duration Avg duration Feb 21 00 1 808ms 808ms 11 3 2s448ms 816ms 12 29 23s795ms 820ms 13 93 1m18s 841ms 14 74 1m2s 848ms 15 64 54s756ms 855ms 16 105 1m27s 837ms 17 50 42s437ms 848ms 18 110 1m33s 852ms 19 80 1m8s 857ms 20 50 45s97ms 901ms 21 20 17s769ms 888ms 23 1 805ms 805ms -
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."is_core" IS NULL or "product_template"."is_core" = false) AND (("product_template"."type" in ('consu', 'product')) AND (((((unaccent ("product_template"."default_code"::text) ilike unaccent ('%m807005%')) OR ("product_template"."id" IN ( SELECT "product_product"."product_tmpl_id" FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") WHERE (("product_product"."active" = true) AND (unaccent ("product_product"."default_code"::text) ilike unaccent ('%m807005%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL)))) OR unaccent (COALESCE("product_template__name"."value", "product_template"."name")) ilike unaccent ('%m807005%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%m807005%')))))) AND (("product_template"."company_id" in (1)) OR "product_template"."company_id" IS NULL) ORDER BY COALESCE("product_template__name"."value", "product_template"."name") LIMIT 80;
Date: 2024-02-21 15:50:46 Duration: 2s146ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."is_core" IS NULL or "product_template"."is_core" = false) AND (("product_template"."type" in ('consu', 'product')) AND (((((unaccent ("product_template"."default_code"::text) ilike unaccent ('%sfpec40est-r%')) OR ("product_template"."id" IN ( SELECT "product_product"."product_tmpl_id" FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") WHERE (("product_product"."active" = true) AND (unaccent ("product_product"."default_code"::text) ilike unaccent ('%sfpec40est-r%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL)))) OR unaccent (COALESCE("product_template__name"."value", "product_template"."name")) ilike unaccent ('%sfpec40est-r%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%sfpec40est-r%')))))) AND (("product_template"."company_id" in (1)) OR "product_template"."company_id" IS NULL) ORDER BY COALESCE("product_template__name"."value", "product_template"."name") LIMIT 80;
Date: 2024-02-21 21:15:18 Duration: 1s561ms
-
SELECT "product_template".id FROM "product_template" LEFT JOIN "ir_translation" AS "product_template__name" ON ("product_template"."id" = "product_template__name"."res_id" AND "product_template__name"."type" = 'model' AND "product_template__name"."name" = 'product.template,name' AND "product_template__name"."lang" = 'en_US' AND "product_template__name"."value" != '') WHERE (("product_template"."active" = true) AND (("product_template"."is_core" IS NULL or "product_template"."is_core" = false) AND (("product_template"."type" in ('consu', 'product')) AND (((((unaccent ("product_template"."default_code"::text) ilike unaccent ('%345-681%')) OR ("product_template"."id" IN ( SELECT "product_product"."product_tmpl_id" FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") WHERE (("product_product"."active" = true) AND (unaccent ("product_product"."default_code"::text) ilike unaccent ('%345-681%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL)))) OR unaccent (COALESCE("product_template__name"."value", "product_template"."name")) ilike unaccent ('%345-681%')) OR FALSE) OR (unaccent ("product_template"."condensed_internal_ref"::text) ilike unaccent ('%345-681%')))))) AND (("product_template"."company_id" in (1)) OR "product_template"."company_id" IS NULL) ORDER BY COALESCE("product_template__name"."value", "product_template"."name") LIMIT 80;
Date: 2024-02-21 19:34:41 Duration: 1s528ms
10 793ms 1s710ms 830ms 3,182 44m1s select "sale_history_line".id from "sale_history_line" where ((((((("sale_history_line"."invoice_date" >= ?) and ("sale_history_line"."invoice_date" < ?)) and (("sale_history_line"."invoice_date" >= ?) and ("sale_history_line"."invoice_date" < ?))) and (("sale_history_line"."invoice_date" >= ?) and ("sale_history_line"."invoice_date" < ?))) and ("sale_history_line"."contact_name" = ?)) and ("sale_history_line"."invoice_number" = ?)) and ("sale_history_line"."user_id" in ( select "res_users".id from "res_users" left join "res_partner" AS "res_users__partner_id" on ("res_users"."partner_id" = "res_users__partner_id"."id") where (unaccent ("res_users__partner_id"."name"::text) ilike unaccent (?)) and (("res_users"."share" is null or "res_users"."share" = false) or exists ( select ? from "res_company_users_rel" AS "res_users__company_ids" where "res_users__company_ids"."user_id" = "res_users".id and "res_users__company_ids"."cid" in (...))) and (((("res_users__partner_id"."partner_share" is null or "res_users__partner_id"."partner_share" = false) or ("res_users__partner_id"."company_id" in (...))) or "res_users__partner_id"."company_id" is null) and (((("res_users__partner_id"."type" != ?) or "res_users__partner_id"."type" is null) or "res_users__partner_id"."type" is null) or ("res_users__partner_id"."type" = ?)))))) order by "sale_history_line"."invoice_date" desc;Times Reported Time consuming queries #10
Day Hour Count Duration Avg duration Feb 21 20 646 9m1s 838ms 21 2,536 34m59s 828ms -
SELECT "sale_history_line".id FROM "sale_history_line" WHERE ((((((("sale_history_line"."invoice_date" >= '2023-01-01') AND ("sale_history_line"."invoice_date" < '2024-01-01')) AND (("sale_history_line"."invoice_date" >= '2023-08-01') AND ("sale_history_line"."invoice_date" < '2023-09-01'))) AND (("sale_history_line"."invoice_date" >= '2023-08-29') AND ("sale_history_line"."invoice_date" < '2023-08-30'))) AND ("sale_history_line"."contact_name" = 'Tesone Transport Inc.')) AND ("sale_history_line"."invoice_number" = 'I-INV-10686')) AND ("sale_history_line"."user_id" in ( SELECT "res_users".id FROM "res_users" LEFT JOIN "res_partner" AS "res_users__partner_id" ON ("res_users"."partner_id" = "res_users__partner_id"."id") WHERE (unaccent ("res_users__partner_id"."name"::text) ilike unaccent ('%ken k%')) AND (("res_users"."share" IS NULL or "res_users"."share" = false) OR EXISTS ( SELECT 1 FROM "res_company_users_rel" AS "res_users__company_ids" WHERE "res_users__company_ids"."user_id" = "res_users".id AND "res_users__company_ids"."cid" IN (1))) AND (((("res_users__partner_id"."partner_share" IS NULL or "res_users__partner_id"."partner_share" = false) OR ("res_users__partner_id"."company_id" in (1))) OR "res_users__partner_id"."company_id" IS NULL) AND (((("res_users__partner_id"."type" != 'private') OR "res_users__partner_id"."type" IS NULL) OR "res_users__partner_id"."type" IS NULL) OR ("res_users__partner_id"."type" = 'private')))))) ORDER BY "sale_history_line"."invoice_date" DESC;
Date: 2024-02-21 21:19:23 Duration: 1s710ms
-
SELECT "sale_history_line".id FROM "sale_history_line" WHERE ((((((("sale_history_line"."invoice_date" >= '2023-01-01') AND ("sale_history_line"."invoice_date" < '2024-01-01')) AND (("sale_history_line"."invoice_date" >= '2023-05-01') AND ("sale_history_line"."invoice_date" < '2023-06-01'))) AND (("sale_history_line"."invoice_date" >= '2023-05-17') AND ("sale_history_line"."invoice_date" < '2023-05-18'))) AND ("sale_history_line"."contact_name" = 'Heidelberg Materials Northeast LLC')) AND ("sale_history_line"."invoice_number" = 'I-INV-07076')) AND ("sale_history_line"."user_id" in ( SELECT "res_users".id FROM "res_users" LEFT JOIN "res_partner" AS "res_users__partner_id" ON ("res_users"."partner_id" = "res_users__partner_id"."id") WHERE (unaccent ("res_users__partner_id"."name"::text) ilike unaccent ('%ken k%')) AND (("res_users"."share" IS NULL or "res_users"."share" = false) OR EXISTS ( SELECT 1 FROM "res_company_users_rel" AS "res_users__company_ids" WHERE "res_users__company_ids"."user_id" = "res_users".id AND "res_users__company_ids"."cid" IN (1))) AND (((("res_users__partner_id"."partner_share" IS NULL or "res_users__partner_id"."partner_share" = false) OR ("res_users__partner_id"."company_id" in (1))) OR "res_users__partner_id"."company_id" IS NULL) AND (((("res_users__partner_id"."type" != 'private') OR "res_users__partner_id"."type" IS NULL) OR "res_users__partner_id"."type" IS NULL) OR ("res_users__partner_id"."type" = 'private')))))) ORDER BY "sale_history_line"."invoice_date" DESC;
Date: 2024-02-21 21:10:02 Duration: 1s640ms
-
SELECT "sale_history_line".id FROM "sale_history_line" WHERE ((((((("sale_history_line"."invoice_date" >= '2023-01-01') AND ("sale_history_line"."invoice_date" < '2024-01-01')) AND (("sale_history_line"."invoice_date" >= '2023-04-01') AND ("sale_history_line"."invoice_date" < '2023-05-01'))) AND (("sale_history_line"."invoice_date" >= '2023-04-18') AND ("sale_history_line"."invoice_date" < '2023-04-19'))) AND ("sale_history_line"."contact_name" = 'Zarin Truck & Automotive Inc.')) AND ("sale_history_line"."invoice_number" = 'I-INV-05887')) AND ("sale_history_line"."user_id" in ( SELECT "res_users".id FROM "res_users" LEFT JOIN "res_partner" AS "res_users__partner_id" ON ("res_users"."partner_id" = "res_users__partner_id"."id") WHERE (unaccent ("res_users__partner_id"."name"::text) ilike unaccent ('%ken k%')) AND (("res_users"."share" IS NULL or "res_users"."share" = false) OR EXISTS ( SELECT 1 FROM "res_company_users_rel" AS "res_users__company_ids" WHERE "res_users__company_ids"."user_id" = "res_users".id AND "res_users__company_ids"."cid" IN (1))) AND (((("res_users__partner_id"."partner_share" IS NULL or "res_users__partner_id"."partner_share" = false) OR ("res_users__partner_id"."company_id" in (1))) OR "res_users__partner_id"."company_id" IS NULL) AND (((("res_users__partner_id"."type" != 'private') OR "res_users__partner_id"."type" IS NULL) OR "res_users__partner_id"."type" IS NULL) OR ("res_users__partner_id"."type" = 'private')))))) ORDER BY "sale_history_line"."invoice_date" DESC;
Date: 2024-02-21 21:07:02 Duration: 1s636ms
11 613ms 1s645ms 683ms 545 6m12s select product_product.id from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") left join "ir_translation" AS "product_product__product_tmpl_id__name" on ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" and "product_product__product_tmpl_id__name"."type" = ? and "product_product__product_tmpl_id__name"."name" = ? and "product_product__product_tmpl_id__name"."lang" = ? and "product_product__product_tmpl_id__name"."value" != ?) where (("product_product"."active" = true) and (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent (?)) or (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) or unaccent (coalesce("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent (?))) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null) order by product_product.default_code, product_product.condensed_internal_ref;Times Reported Time consuming queries #11
Day Hour Count Duration Avg duration Feb 21 12 57 37s434ms 656ms 13 80 58s313ms 728ms 14 31 21s71ms 679ms 15 26 16s988ms 653ms 16 59 39s172ms 663ms 17 15 9s769ms 651ms 18 140 1m36s 692ms 19 66 43s159ms 653ms 20 13 9s737ms 749ms 21 58 39s781ms 685ms -
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%20rl%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%20rl%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%20rl%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 13:14:33 Duration: 1s645ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%20rls%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%20rls%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%20rls%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 13:14:33 Duration: 1s634ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%20r%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%20r%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%20r%'))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 13:14:32 Duration: 1s533ms
12 622ms 1s622ms 680ms 808 9m10s select product_product.id from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") left join "ir_translation" AS "product_product__product_tmpl_id__name" on ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" and "product_product__product_tmpl_id__name"."type" = ? and "product_product__product_tmpl_id__name"."name" = ? and "product_product__product_tmpl_id__name"."lang" = ? and "product_product__product_tmpl_id__name"."value" != ?) where (((("product_product"."active" = true) and (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent (?)) or (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) or unaccent (coalesce("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent (?))) and ("product_product__product_tmpl_id"."type" in (...))) and ("product_product__product_tmpl_id"."company_id" is null or ("product_product__product_tmpl_id"."company_id" = ?))) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null) order by product_product.default_code, product_product.condensed_internal_ref;Times Reported Time consuming queries #12
Day Hour Count Duration Avg duration Feb 21 17 142 1m35s 669ms 18 317 3m35s 680ms 19 252 2m51s 679ms 20 97 1m8s 703ms -
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%esiiax4709%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%esii-ax4709%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%esii-ax4709%'))) AND ("product_product__product_tmpl_id"."type" in ('product', 'consu'))) AND ("product_product__product_tmpl_id"."company_id" IS NULL OR ("product_product__product_tmpl_id"."company_id" = 1))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 18:16:51 Duration: 1s622ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%esiiax4709k%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%esii-ax4709k%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%esii-ax4709k%'))) AND ("product_product__product_tmpl_id"."type" in ('product', 'consu'))) AND ("product_product__product_tmpl_id"."company_id" IS NULL OR ("product_product__product_tmpl_id"."company_id" = 1))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 18:16:52 Duration: 1s509ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE (((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%enp4%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%enp4%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%enp4%'))) AND ("product_product__product_tmpl_id"."type" in ('product', 'consu'))) AND ("product_product__product_tmpl_id"."company_id" IS NULL OR ("product_product__product_tmpl_id"."company_id" = 1))) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 19:50:11 Duration: 1s147ms
13 598ms 2s222ms 679ms 3,352 37m59s select product_product.id from "product_product" left join "product_template" AS "product_product__product_tmpl_id" on ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") left join "ir_translation" AS "product_product__product_tmpl_id__name" on ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" and "product_product__product_tmpl_id__name"."type" = ? and "product_product__product_tmpl_id__name"."name" = ? and "product_product__product_tmpl_id__name"."lang" = ? and "product_product__product_tmpl_id__name"."value" != ?) where ((("product_product"."active" = true) and (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent (?)) or (unaccent ("product_product"."default_code"::text) ilike unaccent (?))) or unaccent (coalesce("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent (?))) and ("product_product__product_tmpl_id"."sale_ok" is not null and "product_product__product_tmpl_id"."sale_ok" != false)) and (("product_product__product_tmpl_id"."company_id" in (...)) or "product_product__product_tmpl_id"."company_id" is null) order by product_product.default_code, product_product.condensed_internal_ref;Times Reported Time consuming queries #13
Day Hour Count Duration Avg duration Feb 21 03 4 2s494ms 623ms 11 20 12s751ms 637ms 12 258 2m48s 651ms 13 418 4m41s 673ms 14 458 5m14s 686ms 15 524 6m 688ms 16 308 3m28s 677ms 17 240 2m41s 671ms 18 305 3m25s 675ms 19 302 3m26s 683ms 20 200 2m26s 733ms 21 232 2m37s 679ms 22 83 53s74ms 639ms -
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%g25170%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%g25170-%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%g25170-%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 15:50:46 Duration: 2s222ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%s19%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%s-19%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%s-19%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 15:25:37 Duration: 1s905ms
-
SELECT product_product.id FROM "product_product" LEFT JOIN "product_template" AS "product_product__product_tmpl_id" ON ("product_product"."product_tmpl_id" = "product_product__product_tmpl_id"."id") LEFT JOIN "ir_translation" AS "product_product__product_tmpl_id__name" ON ("product_product__product_tmpl_id"."id" = "product_product__product_tmpl_id__name"."res_id" AND "product_product__product_tmpl_id__name"."type" = 'model' AND "product_product__product_tmpl_id__name"."name" = 'product.template,name' AND "product_product__product_tmpl_id__name"."lang" = 'en_US' AND "product_product__product_tmpl_id__name"."value" != '') WHERE ((("product_product"."active" = true) AND (((unaccent ("product_product"."condensed_internal_ref"::text) ilike unaccent ('%%s191%%')) OR (unaccent ("product_product"."default_code"::text) ilike unaccent ('%s-191%'))) OR unaccent (COALESCE("product_product__product_tmpl_id__name"."value", "product_product__product_tmpl_id"."name")) ilike unaccent ('%s-191%'))) AND ("product_product__product_tmpl_id"."sale_ok" IS NOT NULL and "product_product__product_tmpl_id"."sale_ok" != false)) AND (("product_product__product_tmpl_id"."company_id" in (1)) OR "product_product__product_tmpl_id"."company_id" IS NULL) ORDER BY product_product.default_code, product_product.condensed_internal_ref;
Date: 2024-02-21 15:25:37 Duration: 1s785ms
14 266ms 4s106ms 662ms 574 6m20s update "stock_move" set "current_warehouse_qty" = ?.?, "date" = ?, "state" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);Times Reported Time consuming queries #14
Day Hour Count Duration Avg duration Feb 21 12 10 5s441ms 544ms 13 12 7s522ms 626ms 14 32 35s424ms 1s107ms 15 15 10s66ms 671ms 16 55 51s300ms 932ms 17 49 29s801ms 608ms 18 162 1m34s 584ms 19 156 1m30s 580ms 20 68 43s968ms 646ms 21 15 11s750ms 783ms -
UPDATE "stock_move" SET "current_warehouse_qty" = 5.0, "date" = '2024-02-21 16:51:22', "state" = 'done', "write_uid" = 1007, "write_date" = (now() at time zone 'UTC') WHERE id IN (819712, 819713, 819714, 819715, 819716);
Date: 2024-02-21 16:51:27 Duration: 4s106ms
-
UPDATE "stock_move" SET "current_warehouse_qty" = 5.0, "date" = '2024-02-21 16:50:59', "state" = 'done', "write_uid" = 1007, "write_date" = (now() at time zone 'UTC') WHERE id IN (819712, 819713, 819714, 819715, 819716);
Date: 2024-02-21 16:51:03 Duration: 3s621ms
-
UPDATE "stock_move" SET "current_warehouse_qty" = 5.0, "date" = '2024-02-21 16:51:10', "state" = 'done', "write_uid" = 1007, "write_date" = (now() at time zone 'UTC') WHERE id IN (819712, 819713, 819714, 819715, 819716);
Date: 2024-02-21 16:51:15 Duration: 3s494ms
15 138ms 3s305ms 518ms 630 5m26s update "stock_quant" set "quantity" = ?.?, "reserved_quantity" = ?.?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);Times Reported Time consuming queries #15
Day Hour Count Duration Avg duration Feb 21 10 17 8s748ms 514ms 11 4 1s572ms 393ms 12 13 6s813ms 524ms 13 83 44s937ms 541ms 14 120 1m2s 520ms 15 71 37s593ms 529ms 16 55 28s139ms 511ms 17 31 14s897ms 480ms 18 77 38s606ms 501ms 19 50 25s407ms 508ms 20 54 29s159ms 539ms 21 52 25s717ms 494ms 22 3 2s393ms 797ms -
UPDATE "stock_quant" SET "quantity" = 0.0, "reserved_quantity" = 0.0, "write_uid" = 1038, "write_date" = (now() at time zone 'UTC') WHERE id IN (432075, 438478, 433361, 434548, 434773, 436788, 432219, 431933);
Date: 2024-02-21 20:41:31 Duration: 3s305ms
-
UPDATE "stock_quant" SET "quantity" = 0.0, "reserved_quantity" = 0.0, "write_uid" = 961, "write_date" = (now() at time zone 'UTC') WHERE id IN (438213, 438214, 438215, 438217, 438219, 438618);
Date: 2024-02-21 21:01:25 Duration: 2s573ms
-
UPDATE "stock_quant" SET "quantity" = 2.0, "reserved_quantity" = 0.0, "write_uid" = 980, "write_date" = (now() at time zone 'UTC') WHERE id IN (38847, 425676, 316661, 423583);
Date: 2024-02-21 14:59:08 Duration: 1s817ms
16 135ms 4s873ms 509ms 833 7m4s update "stock_move" set "state" = ?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);Times Reported Time consuming queries #16
Day Hour Count Duration Avg duration Feb 21 11 3 957ms 319ms 12 39 20s797ms 533ms 13 64 33s804ms 528ms 14 76 32s384ms 426ms 15 65 30s173ms 464ms 16 60 23s390ms 389ms 17 54 25s494ms 472ms 18 203 1m45s 517ms 19 142 1m18s 552ms 20 81 53s827ms 664ms 21 40 18s279ms 456ms 22 6 1s703ms 283ms -
UPDATE "stock_move" SET "state" = 'confirmed', "write_uid" = 1010, "write_date" = (now() at time zone 'UTC') WHERE id IN (822788, 822789, 822790, 822791, 822792, 822793, 822794, 822795, 822798, 822799, 822800, 822801);
Date: 2024-02-21 12:36:37 Duration: 4s873ms
-
UPDATE "stock_move" SET "state" = 'waiting', "write_uid" = 1038, "write_date" = (now() at time zone 'UTC') WHERE id IN (824653, 824654, 824655, 824656, 824657, 824658, 824659, 824660);
Date: 2024-02-21 20:40:43 Duration: 4s696ms
-
UPDATE "stock_move" SET "state" = 'waiting', "write_uid" = 1003, "write_date" = (now() at time zone 'UTC') WHERE id IN (823180, 823181, 823182, 823183, 823184);
Date: 2024-02-21 15:09:15 Duration: 3s926ms
17 133ms 6s248ms 415ms 794 5m29s update "stock_quant" set "quantity" = ?.?, "write_uid" = ?, "write_date" = (now() at time zone ?) where id in (...);Times Reported Time consuming queries #17
Day Hour Count Duration Avg duration Feb 21 10 2 488ms 244ms 11 1 449ms 449ms 12 7 2s562ms 366ms 13 29 11s912ms 410ms 14 60 25s789ms 429ms 15 32 13s703ms 428ms 16 64 41s186ms 643ms 17 53 19s926ms 375ms 18 248 1m45s 423ms 19 179 1m6s 371ms 20 90 34s367ms 381ms 21 29 7s886ms 271ms -
UPDATE "stock_quant" SET "quantity" = 2.0, "write_uid" = 964, "write_date" = (now() at time zone 'UTC') WHERE id IN (429891, 357981, 28645, 28485, 28649, 429900, 28751, 28431, 250609, 28755, 250613, 28727, 28279, 28733);
Date: 2024-02-21 16:52:21 Duration: 6s248ms
-
UPDATE "stock_quant" SET "quantity" = 2.0, "write_uid" = 991, "write_date" = (now() at time zone 'UTC') WHERE id IN (326659, 150916, 41059, 150918, 41161, 431658, 350059, 41163, 249233, 320530, 40947, 320533, 41085);
Date: 2024-02-21 18:05:34 Duration: 5s377ms
-
UPDATE "stock_quant" SET "quantity" = 6.0, "write_uid" = 1003, "write_date" = (now() at time zone 'UTC') WHERE id IN (431513, 2506, 301036, 253533);
Date: 2024-02-21 14:24:51 Duration: 1s787ms
18 120ms 1s628ms 372ms 7,714 47m54s select "bus_bus".id from "bus_bus" where (("bus_bus"."create_date" > ?) and ("bus_bus"."channel" in (...))) order by "bus_bus"."id";Times Reported Time consuming queries #18
Day Hour Count Duration Avg duration Feb 21 00 117 41s733ms 356ms 01 67 22s791ms 340ms 02 101 35s19ms 346ms 03 61 21s46ms 345ms 04 110 38s653ms 351ms 05 105 34s438ms 327ms 06 100 34s157ms 341ms 07 83 28s654ms 345ms 08 62 26s868ms 433ms 09 133 48s583ms 365ms 10 70 25s298ms 361ms 11 101 31s627ms 313ms 12 172 49s830ms 289ms 13 757 4m32s 359ms 14 592 3m8s 318ms 15 593 5m21s 541ms 16 453 3m22s 447ms 17 621 5m13s 504ms 18 696 4m27s 384ms 19 722 5m24s 449ms 20 1,559 6m33s 252ms 21 345 2m4s 359ms 22 47 12s630ms 268ms 23 47 14s123ms 300ms -
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-02-21 17:28:24') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1016"', '["pointspring_master","calendar.alarm",19554]', '["pointspring_master","mail.channel",162]', '["pointspring_master","mail.channel",163]', '["pointspring_master","mail.channel",164]', '["pointspring_master","mail.channel",165]', '["pointspring_master","mail.channel",166]', '["pointspring_master","mail.channel",167]', '["pointspring_master","res.partner",19554]', '["pointspring_master","ir.needaction",19554]'))) ORDER BY "bus_bus"."id";
Date: 2024-02-21 17:29:15 Duration: 1s628ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-02-21 17:28:24') AND ("bus_bus"."channel" in ('"bundle_changed"', '"notify_branch_changed_1001"', '["pointspring_master","calendar.alarm",19539]', '["pointspring_master","mail.channel",59]', '["pointspring_master","mail.channel",60]', '["pointspring_master","mail.channel",248]', '["pointspring_master","mail.channel",252]', '["pointspring_master","mail.channel",340]', '["pointspring_master","mail.channel",442]', '["pointspring_master","mail.channel",449]', '["pointspring_master","mail.channel",453]', '["pointspring_master","mail.channel",476]', '["pointspring_master","mail.channel",485]', '["pointspring_master","mail.channel",487]', '["pointspring_master","mail.channel",496]', '["pointspring_master","mail.channel",497]', '["pointspring_master","mail.channel",512]', '["pointspring_master","mail.channel",530]', '["pointspring_master","mail.channel",557]', '["pointspring_master","mail.channel",558]', '["pointspring_master","mail.channel",559]', '["pointspring_master","mail.channel",581]', '["pointspring_master","res.partner",19539]', '["pointspring_master","ir.needaction",19539]'))) ORDER BY "bus_bus"."id";
Date: 2024-02-21 17:29:15 Duration: 1s578ms
-
SELECT "bus_bus".id FROM "bus_bus" WHERE (("bus_bus"."create_date" > '2024-02-21 15:49:53') AND ("bus_bus"."channel" in ('["pointspring_master","calendar.alarm",50343]', '["pointspring_master","mail.channel",459]', '["pointspring_master","mail.channel",533]', '["pointspring_master","mail.channel",534]', '["pointspring_master","mail.channel",603]', '["pointspring_master","mail.channel",604]', '["pointspring_master","res.partner",50343]', '["pointspring_master","ir.needaction",50343]'))) ORDER BY "bus_bus"."id";
Date: 2024-02-21 15:50:45 Duration: 1s557ms
19 337ms 1s397ms 363ms 2,620 15m51s select "ir_attachment".id from "ir_attachment" where (("ir_attachment"."res_field" is null and (unaccent ("ir_attachment"."url"::text) like unaccent (?))) and (not ((unaccent ("ir_attachment"."url"::text) like unaccent (?))))) order by "ir_attachment"."id" desc;Times Reported Time consuming queries #19
Day Hour Count Duration Avg duration Feb 21 00 3 1s15ms 338ms 02 3 1s19ms 339ms 03 1 375ms 375ms 08 12 4s66ms 338ms 09 13 4s724ms 363ms 10 21 7s326ms 348ms 11 43 14s859ms 345ms 12 198 1m8s 347ms 13 302 1m49s 363ms 14 379 2m17s 363ms 15 248 1m28s 357ms 16 276 1m37s 352ms 17 227 1m21s 358ms 18 312 1m52s 359ms 19 221 1m20s 362ms 20 227 1m34s 416ms 21 124 43s743ms 352ms 22 10 3s432ms 343ms -
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-9ded8a0/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-21 17:54:22 Duration: 1s397ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.report_assets_common.css'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-210dda0/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-21 15:25:35 Duration: 906ms
-
SELECT "ir_attachment".id FROM "ir_attachment" WHERE (("ir_attachment"."res_field" IS NULL AND (unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-%/web.report_assets_common.js'))) AND (NOT ((unaccent ("ir_attachment"."url"::text) like unaccent ('/web/content/%-210dda0/%%%'))))) ORDER BY "ir_attachment"."id" DESC;
Date: 2024-02-21 13:14:32 Duration: 873ms
20 120ms 695ms 325ms 1,361 7m23s select "forecasted_data".id from "forecasted_data" where ("forecasted_data"."item_supply_plan_id" in (...)) order by "forecasted_data"."id";Times Reported Time consuming queries #20
Day Hour Count Duration Avg duration Feb 21 15 28 5s975ms 213ms 16 8 1s695ms 211ms 17 2 360ms 180ms 18 54 12s283ms 227ms 19 1 319ms 319ms 20 350 1m45s 301ms 21 918 5m16s 345ms -
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."item_supply_plan_id" in (35584, 34574)) ORDER BY "forecasted_data"."id";
Date: 2024-02-21 21:16:49 Duration: 695ms
-
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."item_supply_plan_id" in (35584, 34574)) ORDER BY "forecasted_data"."id";
Date: 2024-02-21 21:10:01 Duration: 684ms
-
SELECT "forecasted_data".id FROM "forecasted_data" WHERE ("forecasted_data"."item_supply_plan_id" in (35801)) ORDER BY "forecasted_data"."id";
Date: 2024-02-21 21:10:01 Duration: 669ms
Time consuming prepare
Rank Total duration Times executed Min duration Max duration Avg duration Query NO DATASET
Time consuming bind
Rank Total duration Times executed Min duration Max duration Avg duration Query NO DATASET
-
Events
Log levels
Key values
- 56,900 Log entries
Events distribution
Key values
- 0 PANIC entries
- 0 FATAL entries
- 1559 ERROR entries
- 0 WARNING entries
Most Frequent Errors/Events
Key values
- 1,118 Max number of times the same event was reported
- 1,559 Total events found
Rank Times reported Error 1 1,118 ERROR: could not obtain lock on row in relation "..."
Times Reported Most Frequent Error / Event #1
Day Hour Count Feb 21 00 35 01 42 02 55 03 27 04 21 05 23 06 22 07 21 08 20 09 45 10 45 11 31 12 137 13 167 14 190 15 19 16 31 17 29 18 29 19 23 20 27 21 28 22 23 23 28 - ERROR: could not obtain lock on row in relation "ir_cron"
- ERROR: could not obtain lock on row in relation "res_partner"
Statement: SELECT * FROM ir_cron WHERE numbercall != 0 AND active AND nextcall <= (now() at time zone 'UTC') AND id=67 FOR UPDATE NOWAIT
Date: 2024-02-21 12:50:03
Statement: SELECT "customer_rank" FROM res_partner WHERE ID IN (33886) FOR UPDATE NOWAIT; UPDATE res_partner SET "customer_rank" = "customer_rank" + 1 WHERE id IN (33886)
Date: 2024-02-21 13:38:31
2 387 ERROR: could not serialize access due to concurrent update
Times Reported Most Frequent Error / Event #2
Day Hour Count Feb 21 00 1 04 1 05 3 06 1 08 1 09 8 10 7 11 9 12 26 13 47 14 57 15 33 16 47 17 26 18 38 19 23 20 46 21 12 22 1 - ERROR: could not serialize access due to concurrent update
Statement: DELETE FROM ir_attachment WHERE id IN ( SELECT id FROM ir_attachment WHERE id in (5088742) FOR NO KEY UPDATE SKIP LOCKED )
Date: 2024-02-21 12:51:39
3 22 LOG: process ... still waiting for ShareLock on transaction ... after ... ms
Times Reported Most Frequent Error / Event #3
Day Hour Count Feb 21 01 1 13 3 14 7 15 2 16 4 17 2 19 2 21 1 - ERROR: process 3287820 still waiting for ShareLock on transaction 241376671 after 1000.046 ms
- ERROR: process 3290853 still waiting for ShareLock on transaction 241377127 after 1000.037 ms
- ERROR: process 3287820 still waiting for ShareLock on transaction 241378570 after 1000.066 ms
Detail: Process holding the lock: 3287817. Wait queue: 3287820.
Context: while updating tuple (7371,12) in relation "account_move"
Statement: UPDATE "account_move" SET "message_main_attachment_id"=5088998,"write_uid"=1026,"write_date"=(now() at time zone 'UTC') WHERE id IN (1220011)Date: 2024-02-21 13:35:25
Detail: Process holding the lock: 3290219. Wait queue: 3290853.
Context: while updating tuple (7464,9) in relation "account_move"
Statement: UPDATE account_move SET write_date = write_date WHERE id = ( SELECT id FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1220029 AND sequence_prefix = (SELECT sequence_prefix FROM account_move WHERE journal_id = 1 AND name != '/' AND sequence_prefix !~ '^(?:.*?)(?:((?<=\D)|(?<=^))((19|20|21)?\d{2}))(?:\D+?)$' AND move_type NOT IN ('out_refund', 'in_refund') AND id != 1220029 ORDER BY id DESC LIMIT 1) ORDER BY sequence_number DESC LIMIT 1 ) RETURNING name;Date: 2024-02-21 13:38:36
Detail: Process holding the lock: 3290073. Wait queue: 3287820.
Context: while updating tuple (7465,20) in relation "account_move"
Statement: UPDATE "account_move" SET "message_main_attachment_id"=5089089,"write_uid"=990,"write_date"=(now() at time zone 'UTC') WHERE id IN (1220046)Date: 2024-02-21 13:48:18
4 8 ERROR: null value in column "..." of relation "..." violates not-null constraint
Times Reported Most Frequent Error / Event #4
Day Hour Count Feb 21 19 8 - ERROR: null value in column "date" of relation "account_move" violates not-null constraint
Detail: Failing row contains (1221850, null, null, null, null, Mo acctg fee accrual, null, draft, null, entry, f, 3, null, 2, null, null, f, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, f, null, null, 1254, null, null, null, null, null, null, null, null, null, null, null, null, null, 1254, 2024-02-21 19:24:50.272585, 1254, 2024-02-21 19:24:50.272585, null, null, no_extract_requested, null, -1, null, null, null, null, null, null, null, null, null, null, null, 1, null, null, null, null, 36, null, null, null, null, null, null, 1, null, f, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, f, f, f, f, null, null, null, null, null, null, 0).
Statement: INSERT INTO "account_move" ("id", "create_uid", "create_date", "write_uid", "write_date", "auto_post", "branch_id", "currency_id", "date", "discount_amount_applied", "edi_billed", "edi_split_lock", "extract_remote_id", "extract_state", "invoice_incoterm_id", "invoice_product_qty", "invoice_user_id", "is_edi_bill", "is_move_sent", "journal_id", "move_type", "open_invoice", "ref", "state", "team_id", "to_check", "to_check_negative") VALUES (nextval('account_move_id_seq'), 1254, (now() at time zone 'UTC'), 1254, (now() at time zone 'UTC'), false, 36, 2, NULL, 0.0, false, false, -1, 'no_extract_requested', NULL, 1.0, 1254, false, false, 3, 'entry', false, 'Mo acctg fee accrual', 'draft', 1, false, false) RETURNING idDate: 2024-02-21 19:24:50
5 7 LOG: process ... still waiting for AccessExclusiveLock on relation ... of database ... after ... ms
Times Reported Most Frequent Error / Event #5
Day Hour Count Feb 21 09 7 - ERROR: process 3271249 still waiting for AccessExclusiveLock on relation 45666 of database 65946 after 1000.069 ms
- ERROR: process 3271249 still waiting for AccessExclusiveLock on relation 3671803 of database 65946 after 1000.055 ms
- ERROR: process 3271249 still waiting for AccessExclusiveLock on relation 45666 of database 65946 after 1000.047 ms
Detail: Process holding the lock: 3267206. Wait queue: 3271249.
Statement: ALTER TABLE "vendor_account_master" ADD CONSTRAINT "vendor_account_master_unique_acc_no" unique (account_number)Date: 2024-02-21 09:15:37
Detail: Process holding the lock: 3267206. Wait queue: 3271249.
Statement: DROP view IF EXISTS sale_line_report CASCADEDate: 2024-02-21 09:15:52
Detail: Process holding the lock: 3267206. Wait queue: 3271249.
Statement: ALTER TABLE "vendor_account_master" ADD CONSTRAINT "vendor_account_master_unique_acc_no" unique (account_number)Date: 2024-02-21 09:16:11
6 6 ERROR: canceling statement due to lock timeout
Times Reported Most Frequent Error / Event #6
Day Hour Count Feb 21 09 6 - ERROR: canceling statement due to lock timeout
Statement: ALTER TABLE "vendor_account_master" ADD CONSTRAINT "vendor_account_master_unique_acc_no" unique (account_number)
Date: 2024-02-21 09:15:51
7 4 ERROR: could not create unique index "..."
Times Reported Most Frequent Error / Event #7
Day Hour Count Feb 21 09 4 - ERROR: could not create unique index "vendor_account_master_unique_acc_no"
Detail: Key (account_number)=(0002609) is duplicated.
Statement: ALTER TABLE "vendor_account_master" ADD CONSTRAINT "vendor_account_master_unique_acc_no" unique (account_number)Date: 2024-02-21 09:17:32
8 3 ERROR: current transaction is aborted, commands ignored until end of transaction block
Times Reported Most Frequent Error / Event #8
Day Hour Count Feb 21 09 1 14 1 19 1 - ERROR: current transaction is aborted, commands ignored until end of transaction block
Statement: SELECT 1 FROM res_groups_users_rel WHERE uid=1263 AND gid IN (SELECT res_id FROM ir_model_data WHERE module='website' AND name='group_website_publisher')
Date: 2024-02-21 19:50:33
9 2 ERROR: deadlock detected
Times Reported Most Frequent Error / Event #9
Day Hour Count Feb 21 15 2 - ERROR: deadlock detected
- ERROR: deadlock detected
Detail: Process 3611815 waits for ShareLock on transaction 241409225; blocked by process 3599616. Process 3599616 waits for ShareLock on transaction 241409224; blocked by process 3611815. Process 3611815: UPDATE "sale_order" SET "partner_id"=39666,"partner_invoice_id"=39666,"partner_shipping_id"=39666,"write_uid"=1263,"write_date"=(now() at time zone 'UTC') WHERE id IN (116935) Process 3599616: UPDATE "sale_order_line" SET "cus_part_route"=NULL,"cus_user_id"=1270,"order_partner_id"=39666,"write_uid"=1263,"write_date"=(now() at time zone 'UTC') WHERE id IN (339943)
Context: while updating tuple (197,8) in relation "sale_order"
Hint: See server log for query details.
Statement: UPDATE "sale_order" SET "partner_id"=39666,"partner_invoice_id"=39666,"partner_shipping_id"=39666,"write_uid"=1263,"write_date"=(now() at time zone 'UTC') WHERE id IN (116935)Date: 2024-02-21 15:51:20
Detail: Process 3599200 waits for ShareLock on transaction 241409491; blocked by process 3288184. Process 3288184 waits for ShareLock on transaction 241409490; blocked by process 3599200. Process 3599200: UPDATE "sale_order_line" SET "cus_part_route"=NULL,"cus_user_id"=1270,"order_partner_id"=39666,"write_uid"=1263,"write_date"=(now() at time zone 'UTC') WHERE id IN (344081) Process 3288184: UPDATE "sale_order" SET "partner_id"=39666,"partner_invoice_id"=39666,"partner_shipping_id"=39666,"write_uid"=1263,"write_date"=(now() at time zone 'UTC') WHERE id IN (118395)
Context: while updating tuple (13727,20) in relation "sale_order_line"
Hint: See server log for query details.
Statement: UPDATE "sale_order_line" SET "cus_part_route"=NULL,"cus_user_id"=1270,"order_partner_id"=39666,"write_uid"=1263,"write_date"=(now() at time zone 'UTC') WHERE id IN (344081)Date: 2024-02-21 15:53:00
10 1 ERROR: could not serialize access due to concurrent delete
Times Reported Most Frequent Error / Event #10
Day Hour Count Feb 21 01 1 - ERROR: could not serialize access due to concurrent delete
Statement: DELETE FROM ir_attachment WHERE id IN (5084570, 5084569, 5084568, 5084567)
Date: 2024-02-21 01:24:48
11 1 ERROR: update or delete on table "..." violates foreign key constraint "..." on table "..."
Times Reported Most Frequent Error / Event #11
Day Hour Count Feb 21 19 1 - ERROR: update or delete on table "product_product" violates foreign key constraint "stock_inventory_line_report_product_id_fkey" on table "stock_inventory_line_report"
Detail: Key (id)=(243222) is still referenced from table "stock_inventory_line_report".
Statement: DELETE FROM product_template WHERE id IN (243314)Date: 2024-02-21 19:24:46