Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd52c9f4

Browse files
committed
[Doc]: fix pgpathman.sgml
1 parentb7f3e74 commitd52c9f4

File tree

1 file changed

+80
-73
lines changed

1 file changed

+80
-73
lines changed

‎doc/src/sgml/pgpathman.sgml‎

Lines changed: 80 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -560,84 +560,91 @@ CREATE TABLE some_table AS SELECT generate_series(1, 100) AS VAL;
560560
<listitem>
561561
<para>
562562
<emphasis role="strong"><literal>id = (select ... limit 1)</literal></emphasis>
563-
plpgsql EXPLAIN (COSTS OFF, ANALYZE) SELECT * FROM
564-
partitioned_table WHERE id = (SELECT * FROM some_table LIMIT
565-
1); QUERY PLAN
566-
----------------------------------------------------------------------------------------------------
567-
Custom Scan (RuntimeAppend) (actual time=0.030..0.033 rows=1
568-
loops=1) InitPlan 1 (returns $0) -&gt; Limit (actual
569-
time=0.011..0.011 rows=1 loops=1) -&gt; Seq Scan on some_table
570-
(actual time=0.010..0.010 rows=1 loops=1) -&gt; Seq Scan on
571-
partitioned_table_70 partitioned_table (actual
572-
time=0.004..0.006 rows=1 loops=1) Filter: (id = $0) Rows
573-
Removed by Filter: 9 Planning time: 1.131 ms Execution time:
574-
0.075 ms (9 rows)
575-
</para>
576-
</listitem>
577-
</itemizedlist>
578-
<para>
579-
/* disable RuntimeAppend node */ SET
580-
pg_pathman.enable_runtimeappend = f;
581-
</para>
582-
<para>
583-
EXPLAIN (COSTS OFF, ANALYZE) SELECT * FROM partitioned_table WHERE
584-
id = (SELECT * FROM some_table LIMIT 1); QUERY PLAN
585-
----------------------------------------------------------------------------------
586-
Append (actual time=0.196..0.274 rows=1 loops=1) InitPlan 1
587-
(returns $0) -&gt; Limit (actual time=0.005..0.005 rows=1 loops=1)
588-
-&gt; Seq Scan on some_table (actual time=0.003..0.003 rows=1
589-
loops=1) -&gt; Seq Scan on partitioned_table_0 (actual
590-
time=0.014..0.014 rows=0 loops=1) Filter: (id = $0) Rows Removed
591-
by Filter: 6 -&gt; Seq Scan on partitioned_table_1 (actual
592-
time=0.003..0.003 rows=0 loops=1) Filter: (id = $0) Rows Removed
593-
by Filter: 5 ... /* more plans follow */ Planning time: 1.140 ms
594-
Execution time: 0.855 ms (306 rows)
563+
<programlisting>
564+
plpgsql
565+
EXPLAIN (COSTS OFF, ANALYZE) SELECT * FROM partitioned_table
566+
WHERE id = (SELECT * FROM some_table LIMIT 1);
567+
QUERY PLAN
568+
----------------------------------------------------------------------------------------------------
569+
Custom Scan (RuntimeAppend) (actual time=0.030..0.033 rows=1 loops=1)
570+
InitPlan 1 (returns $0)
571+
-&gt; Limit (actual time=0.011..0.011 rows=1 loops=1)
572+
-&gt; Seq Scan on some_table (actual time=0.010..0.010 rows=1 loops=1)
573+
-&gt; Seq Scan on partitioned_table_70 partitioned_table (actual time=0.004..0.006 rows=1 loops=1)
574+
Filter: (id = $0)
575+
Rows Removed by Filter: 9
576+
Planning time: 1.131 ms
577+
Execution time: 0.075 ms
578+
(9 rows)
579+
580+
/* disable RuntimeAppend node */
581+
SET pg_pathman.enable_runtimeappend = f;
582+
583+
EXPLAIN (COSTS OFF, ANALYZE) SELECT * FROM partitioned_table
584+
WHERE id = (SELECT * FROM some_table LIMIT 1);
585+
QUERY PLAN
586+
----------------------------------------------------------------------------------
587+
Append (actual time=0.196..0.274 rows=1 loops=1)
588+
InitPlan 1 (returns $0)
589+
-&gt; Limit (actual time=0.005..0.005 rows=1 loops=1)
590+
-&gt; Seq Scan on some_table (actual time=0.003..0.003 rows=1 loops=1)
591+
-&gt; Seq Scan on partitioned_table_0 (actual time=0.014..0.014 rows=0 loops=1)
592+
Filter: (id = $0)
593+
Rows Removed by Filter: 6
594+
-&gt; Seq Scan on partitioned_table_1 (actual time=0.003..0.003 rows=0 loops=1)
595+
Filter: (id = $0)
596+
Rows Removed by Filter: 5
597+
... /* more plans follow */
598+
Planning time: 1.140 ms
599+
Execution time: 0.855 ms
600+
(306 rows)
601+
</programlisting>
595602
</para>
596603
<itemizedlist spacing="compact">
597604
<listitem>
598605
<para>
599606
<emphasis role="strong"><literal>id = ANY (select ...)</literal></emphasis>
600-
plpgsql EXPLAIN (COSTS OFF, ANALYZE) SELECT * FROM
601-
partitioned_table WHERE id = any (SELECT * FROM some_table
602-
limit 4); QUERY PLAN
603-
-----------------------------------------------------------------------------------------------------------
604-
Nested Loop (actual time=0.025..0.060 rows=4 loops=1) -&gt;
605-
Limit (actual time=0.009..0.011 rows=4 loops=1) -&gt; Seq Scan
606-
on some_table(actual time=0.008..0.010 rows=4 loops=1) -&gt;
607-
Custom Scan (RuntimeAppend) (actual time=0.002..0.004 rows=1
608-
loops=4)-&gt; Seq Scan onpartitioned_table_70
609-
partitioned_table(actual time=0.001..0.001 rows=10 loops=1)
610-
-&gt; Seq Scan onpartitioned_table_26 partitioned_table
611-
(actual time=0.002..0.003 rows=9 loops=1) -&gt; Seq Scan on
612-
partitioned_table_27 partitioned_table (actual
613-
time=0.001..0.002 rows=20 loops=1) -&gt; Seq Scan on
614-
partitioned_table_63 partitioned_table (actual
615-
time=0.001..0.002 rows=9 loops=1) Planning time: 0.771 ms
616-
Execution time: 0.101 ms(10 rows)
617-
</para>
618-
</listitem>
619-
</itemizedlist>
620-
<para>
621-
/* disable RuntimeAppend node */ SET
622-
pg_pathman.enable_runtimeappend = f;
623-
</para>
624-
<para>
625-
EXPLAIN (COSTS OFF, ANALYZE) SELECT * FROM partitioned_table WHERE
626-
id =any (SELECT * FROMsome_table limit 4); QUERY PLAN
627-
-----------------------------------------------------------------------------------------
628-
Nested Loop Semi Join(actual time=0.531..1.526 rows=4 loops=1)
629-
Join Filter: (partitioned_table.id = some_table.val) Rows Removed
630-
by Join Filter: 3990-&gt;Append(actual time=0.190..0.470
631-
rows=1000 loops=1)-&gt; Seq Scan onpartitioned_table (actual
632-
time=0.187..0.187 rows=0 loops=1) -&gt; Seq Scan on
633-
partitioned_table_0 (actual time=0.002..0.004 rows=6 loops=1)
634-
-&gt;Seq Scan on partitioned_table_1(actual time=0.001..0.001
635-
rows=5 loops=1)-&gt;Seq Scan on partitioned_table_2(actual
636-
time=0.002..0.004 rows=14 loops=1) ... /* 96 scans follow */ -&gt;
637-
Materialize (actualtime=0.000..0.000 rows=4 loops=1000) -&gt;
638-
Limit (actualtime=0.005..0.006 rows=4 loops=1) -&gt; Seq Scan on
639-
some_table (actual time=0.003..0.004rows=4 loops=1) Planning
640-
time: 2.169 ms Execution time: 2.059 ms (110 rows)
607+
<programlisting>
608+
plpgsql
609+
EXPLAIN (COSTS OFF, ANALYZE) SELECT * FROM partitioned_table
610+
WHERE id = any (SELECT * FROM some_table limit 4);
611+
QUERY PLAN
612+
-----------------------------------------------------------------------------------------------------------
613+
Nested Loop(actual time=0.025..0.060 rows=4 loops=1)
614+
-&gt; Limit (actual time=0.009..0.011 rows=4 loops=1)
615+
-&gt;Seq Scan onsome_table (actual time=0.008..0.010 rows=4 loops=1)
616+
-&gt; Custom Scan (RuntimeAppend)(actual time=0.002..0.004 rows=1 loops=4)
617+
-&gt;Seq Scan onpartitioned_table_70 partitioned_table (actual time=0.001..0.001 rows=10 loops=1)
618+
-&gt; Seq Scan on partitioned_table_26 partitioned_table(actual time=0.002..0.003 rows=9 loops=1)
619+
-&gt; Seq Scan onpartitioned_table_27 partitioned_table (actual time=0.001..0.002 rows=20 loops=1)
620+
-&gt; Seq Scan on partitioned_table_63 partitioned_table (actualtime=0.001..0.002 rows=9 loops=1)
621+
Planning time: 0.771 ms
622+
Executiontime: 0.101 ms
623+
(10 rows)
624+
625+
/* disable RuntimeAppend node */
626+
SET pg_pathman.enable_runtimeappend = f;
627+
628+
EXPLAIN (COSTS OFF, ANALYZE) SELECT * FROM partitioned_table
629+
WHERE id = any (SELECT * FROM some_table limit 4);
630+
QUERY PLAN
631+
-----------------------------------------------------------------------------------------
632+
Nested Loop Semi Join (actual time=0.531..1.526 rows=4 loops=1)
633+
Join Filter: (partitioned_table.id = some_table.val)
634+
Rows Removed by Join Filter: 3990
635+
-&gt; Append(actual time=0.190..0.470 rows=1000 loops=1)
636+
-&gt; Seq Scan onpartitioned_table (actual time=0.187..0.187 rows=0 loops=1)
637+
-&gt; Seq Scan on partitioned_table_0(actual time=0.002..0.004 rows=6 loops=1)
638+
-&gt;Seq Scan onpartitioned_table_1 (actual time=0.001..0.001 rows=5 loops=1)
639+
-&gt; Seq Scan on partitioned_table_2 (actualtime=0.002..0.004 rows=14 loops=1)
640+
... /* 96 scans follow */
641+
-&gt; Materialize(actual time=0.000..0.000 rows=4 loops=1000)
642+
-&gt; Limit(actual time=0.005..0.006 rows=4 loops=1)
643+
-&gt; Seq Scan on some_table (actualtime=0.003..0.004 rows=4 loops=1)
644+
Planningtime: 2.169 ms
645+
Executiontime: 2.059 ms
646+
(110rows)
647+
</programlisting>
641648
</para>
642649
<itemizedlist spacing="compact">
643650
<listitem>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp