Re: Wrong rows estimations with joins of CTEs slows queries by more than factor 500

2023-09-07 Thread Jian Guo
Labels and Declarations (Using the GNU Compiler Collection (GCC)) gcc.gnu.org From: jian he Sent: Wednesday, September 6, 2023 14:00 To: Jian Guo Cc: Tomas Vondra ; Hans Buschmann ; pgsql-hackers@lists.postgresql.org Subject: Re: Wrong rows estimations with joins o

Re: Wrong rows estimations with joins of CTEs slows queries by more than factor 500

2023-08-21 Thread Jian Guo
Sure, Tomas. Here is the PG Commitfest link: https://commitfest.postgresql.org/44/4510/ From: Tomas Vondra Sent: Monday, August 21, 2023 18:56 To: Jian Guo ; Hans Buschmann ; pgsql-hackers@lists.postgresql.org Cc: Zhenghua Lyu Subject: Re: Wrong rows

Re: Wrong rows estimations with joins of CTEs slows queries by more than factor 500

2023-08-21 Thread Jian Guo
, which avoided the bad assumption, so the results could be much more accurate. Regards, Jian From: Tomas Vondra Sent: Monday, August 14, 2023 20:58 To: Jian Guo ; Hans Buschmann ; pgsql-hackers@lists.postgresql.org Subject: Re: Wrong rows estimations with joins

Re: Wrong rows estimations with joins of CTEs slows queries by more than factor 500

2023-08-14 Thread Jian Guo
Filter: ((ibitmask < 0) OR (cardinality(mat_arr) > 11)) Rows Removed by Filter: 10275 Planning Time: 1.746 ms Execution Time: 13405.503 ms (116 Zeilen) This case really brought me to detect the problem! The original query and data are not shown here, but the princip

Re: On disable_cost

2023-08-03 Thread Jian Guo
mjgt2yP59t7xtv1mZvC%2BBhtKrfp%2FBY%3D=0<http://www.timbira.com.br/> PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento !! External Email: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sende

Question about use_physical_tlist() which is applied on Scan path

2023-07-26 Thread Jian Guo
Hi hackers, I have a question about `use_physical_tlist()` which is applied in `create_scan_plan()`: ``` if (flags == CP_IGNORE_TLIST) { tlist = NULL; } else if (use_physical_tlist(root, best_path, flags)) { if (best_path->pathtype == T_IndexOnlyScan) { /* For index-only scan, the

Re: Summary Sort workers Stats in EXPLAIN ANALYZE

2022-03-28 Thread Jian Guo
review, thanks. From: Julien Rouhaud Sent: Friday, March 25, 2022 17:04 To: Jian Guo Cc: pgsql-hackers@lists.postgresql.org ; Zhenghua Lyu Subject: Re: Summary Sort workers Stats in EXPLAIN ANALYZE ⚠ External Email Hi, On Thu, Mar 24, 2022 at 07:50:11AM +

Re: Summary Sort workers Stats in EXPLAIN ANALYZE

2022-03-24 Thread Jian Guo
"Actual Rows": N, + "Actual Loops": N, + "Sort Key": ["unique1"], + "Workers planned": N, + "Sort Method": "external merge",

Re: Summary Sort workers Stats in EXPLAIN ANALYZE

2022-03-21 Thread Jian Guo
There is some problem with the last patch, I have removed the `ExplainOpenWorker` call to fix. And also, I have added a test case in explain.sql​ according to the code change. From: Jian Guo Sent: Monday, March 21, 2022 11:36 To: pgsql-hackers

Summary Sort workers Stats in EXPLAIN ANALYZE

2022-03-20 Thread Jian Guo
#L2890 From 8970f3d0f4a4535457dbe7f625081e592ebc1901 Mon Sep 17 00:00:00 2001 From: Jian Guo Date: Mon, 21 Mar 2022 11:19:46 +0800 Subject: [PATCH] Summary Sort workers Stats. Signed-off-by: Jian Guo --- src/backend/commands/explain.c | 48 +++--- 1 file changed, 27

Re: Teach pg_receivewal to use lz4 compression

2021-09-10 Thread Jian Guo
@@ -250,14 +302,18 @@ FindStreamingStart(uint32 *tli) /* * Check that the segment has the right size, if it's supposed to be * completed. For non-compressed segments just check the on-disk size -* and see if it matches a