]> git.8kb.co.uk Git - postgresql/pg_jsonb_delete_op/log
postgresql/pg_jsonb_delete_op
9 years agoUse array ALL() function, and remove json/jsonb casts
Matthew Schinckel [Fri, 23 Jan 2015 09:06:54 +0000 (19:36 +1030)]
Use array ALL() function, and remove json/jsonb casts

<pre>
[[local]:5432] matt@~ =# EXPLAIN ANALYZE SELECT to_json('x2'::text)::jsonb ?| ARRAY['x', 'y'] FROM generate_series(1,100000);
                                                        QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------
 Function Scan on generate_series  (cost=0.00..20.00 rows=1000 width=0) (actual time=23.261..357.720 rows=100000 loops=1)
 Planning time: 0.051 ms
 Execution time: 376.334 ms
(3 rows)

Time: 376.732 ms

[[local]:5432] matt@~ =# EXPLAIN ANALYZE SELECT 'x2' <> ALL( ARRAY['x', 'y']) FROM generate_series(1,100000);
                                                       QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------
 Function Scan on generate_series  (cost=0.00..12.50 rows=1000 width=0) (actual time=22.687..59.327 rows=100000 loops=1)
 Planning time: 0.112 ms
 Execution time: 71.561 ms
(3 rows)

Time: 72.162 ms
</pre>

9 years agoRemove error in example
glyn [Mon, 19 Jan 2015 09:50:16 +0000 (09:50 +0000)]
Remove error in example

9 years agoInfact there is no need to roll up values in where clause when deleteing by key
glyn [Mon, 19 Jan 2015 09:41:44 +0000 (09:41 +0000)]
Infact there is no need to roll up values in where clause when deleteing by key

9 years agoUse to_json rather than blindly quoting strings in where clause
glyn [Mon, 19 Jan 2015 09:19:58 +0000 (09:19 +0000)]
Use to_json rather than blindly quoting strings in where clause

9 years agoRevert "Use to_json rather than concatenating strings in where clause"
glyn [Mon, 19 Jan 2015 09:00:21 +0000 (09:00 +0000)]
Revert "Use to_json rather than concatenating strings in where clause"

This reverts commit 263aa2ca57f58c294adb05ba51649dd7c6edc14f.

9 years agoUse to_json rather than concatenating strings in where clause
glyn [Mon, 19 Jan 2015 08:49:25 +0000 (08:49 +0000)]
Use to_json rather than concatenating strings in where clause

9 years agoAmmend incorrect comment defs
glyn [Fri, 16 Jan 2015 16:26:57 +0000 (16:26 +0000)]
Ammend incorrect comment defs

9 years agoInitial commit
glyn [Fri, 16 Jan 2015 16:18:10 +0000 (16:18 +0000)]
Initial commit

9 years agoInitial commit
glyn [Fri, 16 Jan 2015 16:16:10 +0000 (16:16 +0000)]
Initial commit