By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
12345 rows affected
| test1 | test2 | test3 | test4 |
|---|---|---|---|
| 12305 | 10305 | 10300 | 10300 |
| test1 | test2 | test3 | test4 |
|---|---|---|---|
| 12305 | 10305 | 10300 | 10300 |
| QUERY PLAN |
|---|
| Aggregate (cost=284.94..284.94 rows=1 width=8) (actual rows=1 loops=1) |
| -> Seq Scan on t (cost=0.00..254.17 rows=12304 width=0) (actual rows=12305 loops=1) |
| Filter: ((txt ~~ '/articles/%'::text) AND (txt <> '/articles/new/'::text)) |
| Rows Removed by Filter: 40 |
| Planning Time: 0.075 ms |
| Execution Time: 2.014 ms |
| QUERY PLAN |
|---|
| Aggregate (cost=279.96..279.97 rows=1 width=8) (actual rows=1 loops=1) |
| -> Seq Scan on t (cost=0.00..254.17 rows=10316 width=0) (actual rows=10305 loops=1) |
| Filter: ((txt ~~ '/articles/%'::text) AND (txt !~~ '/articles/new/%'::text)) |
| Rows Removed by Filter: 2040 |
| Planning Time: 0.050 ms |
| Execution Time: 2.260 ms |
| QUERY PLAN |
|---|
| Aggregate (cost=249.09..249.10 rows=1 width=8) (actual rows=1 loops=1) |
| -> Seq Scan on t (cost=0.00..223.31 rows=10312 width=0) (actual rows=10300 loops=1) |
| Filter: (txt ~ '^/articles(?!/new/)/([\w-]+)/$'::text) |
| Rows Removed by Filter: 2045 |
| Planning Time: 0.384 ms |
| Execution Time: 38.641 ms |
| QUERY PLAN |
|---|
| Aggregate (cost=249.09..249.10 rows=1 width=8) (actual rows=1 loops=1) |
| -> Seq Scan on t (cost=0.00..223.31 rows=10312 width=0) (actual rows=10300 loops=1) |
| Filter: (txt ~ '^/articles/(?!new/)[\w-]+/$'::text) |
| Rows Removed by Filter: 2045 |
| Planning Time: 0.351 ms |
| Execution Time: 37.676 ms |