| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Alexander Lakhin <exclusion(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Performance of JSON_TABLE vs jsonb_to_recordset |
| Date: | 2024-04-20 14:47:37 |
| Message-ID: | 2448626.1713624457@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Alexander Lakhin <exclusion(at)gmail(dot)com> writes:
> When playing with JSON_TABLE, I tried to replace tenk1 in regression tests
> with a view based on JSON_TABLE, with the same content, and discovered
> that for one sub-optimal query it's execution duration increased many-fold.
> With the preparation script attached, I see the following durations
> (for a build compiled by clang 18.1.3 with -O3):
> explain (verbose, analyze)
> select
> (select max((select i.unique2 from tenk1 i where i.unique1 = o.unique1)))
> from tenk1 o;
> -- original tenk1
> Execution Time: 4769.481 ms
Hm, I get about 13 ms for that example. Do you have some really
expensive debugging infrastructure enabled, perhaps?
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2024-04-20 14:58:31 | Re: Performance of JSON_TABLE vs jsonb_to_recordset |
| Previous Message | Anton A. Melnikov | 2024-04-20 13:20:35 | Re: Use XLOG_CONTROL_FILE macro everywhere? |