By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
66 rows affected
id | value |
---|---|
2 | If life were predictable it would cease to be life, and be without flavor. |
3 | Life is what happens when you're busy making other plans. |
7 | Life is either a daring adventure or nothing at all. |
8 | In the end, it's not the years in your life that count. It's the life in your years. |
9 | Life is a succession of lessons which must be lived to be understood. |
10 | Keep smiling, because life is a beautiful thing and there's so much to smile about. |
11 | Life is a long lesson in humility. |
12 | In three words I can sum up everything I've learned about life: it goes on. |
13 | Love the life you live. Live the life you love. |
14 | Life is either a daring adventure or nothing at all. |
16 | Life is made of ever so many partings welded together. |
50 | An unexamined life is not worth |
54 | Life is 10% what happens to me and 90% of how I react to it. |
64 | If you look at what you have in life, you'll always have more. If you look at what you don't have in life, you'll never have enough. |
id | value |
---|---|
2 | If life were predictable it would cease to be life, and be without flavor. |
3 | Life is what happens when you're busy making other plans. |
7 | Life is either a daring adventure or nothing at all. |
8 | In the end, it's not the years in your life that count. It's the life in your years. |
9 | Life is a succession of lessons which must be lived to be understood. |
10 | Keep smiling, because life is a beautiful thing and there's so much to smile about. |
11 | Life is a long lesson in humility. |
12 | In three words I can sum up everything I've learned about life: it goes on. |
13 | Love the life you live. Live the life you love. |
14 | Life is either a daring adventure or nothing at all. |
16 | Life is made of ever so many partings welded together. |
50 | An unexamined life is not worth |
54 | Life is 10% what happens to me and 90% of how I react to it. |
64 | If you look at what you have in life, you'll always have more. If you look at what you don't have in life, you'll never have enough. |
id | value |
---|---|
17 | Don't be distracted by criticism. Remember -- the only taste of success some people get is to take a bite out of you. |
20 | Success seems to be connected with action. Successful people keep moving. They make mistakes but they don't quit. |
25 | Successful people do what unsuccessful people are not willing to do. Don't wish it were easier; wish you were better. |
40 | The only person you are destined to become is the person you decide to be. |
41 | I've learned that people will forget what you said, people will forget what you did, but people will never forget how you made them feel. |
QUERY PLAN |
---|
Seq Scan on quotes (cost=0.00..25.88 rows=10 width=36) (actual time=0.018..0.138 rows=14 loops=1) |
Filter: (value ~~* '%life%'::text) |
Rows Removed by Filter: 52 |
Planning Time: 0.039 ms |
Execution Time: 0.298 ms |
QUERY PLAN |
---|
Seq Scan on quotes (cost=0.00..1.83 rows=1 width=36) (actual time=0.014..0.033 rows=7 loops=1) |
Filter: (value ~~ '%life%'::text) |
Rows Removed by Filter: 59 |
Planning Time: 0.737 ms |
Execution Time: 0.073 ms |
QUERY PLAN |
---|
Bitmap Heap Scan on quotes (cost=12.00..16.02 rows=1 width=36) (actual time=0.341..0.347 rows=7 loops=1) |
Recheck Cond: (value ~~ '%life%'::text) |
Rows Removed by Index Recheck: 7 |
Heap Blocks: exact=1 |
-> Bitmap Index Scan on quotes_idx (cost=0.00..12.00 rows=1 width=0) (actual time=0.328..0.328 rows=14 loops=1) |
Index Cond: (value ~~ '%life%'::text) |
Planning Time: 0.155 ms |
Execution Time: 0.395 ms |
QUERY PLAN |
---|
Bitmap Heap Scan on quotes (cost=8.25..12.77 rows=1 width=32) (actual time=0.022..0.024 rows=14 loops=1) |
Recheck Cond: (to_tsvector('english'::regconfig, value) @@ to_tsquery('life'::text)) |
Heap Blocks: exact=1 |
-> Bitmap Index Scan on quotes_tsvector_idx (cost=0.00..8.25 rows=1 width=0) (actual time=0.017..0.017 rows=14 loops=1) |
Index Cond: (to_tsvector('english'::regconfig, value) @@ to_tsquery('life'::text)) |
Planning Time: 0.235 ms |
Execution Time: 0.047 ms |
QUERY PLAN |
---|
Bitmap Heap Scan on quotes (cost=40.00..44.02 rows=1 width=36) (actual time=0.029..0.032 rows=5 loops=1) |
Recheck Cond: ((value ~~ '%people%'::text) OR (value ~~ '%person%'::text)) |
Heap Blocks: exact=1 |
-> BitmapOr (cost=40.00..40.00 rows=1 width=0) (actual time=0.024..0.024 rows=0 loops=1) |
-> Bitmap Index Scan on quotes_idx (cost=0.00..20.00 rows=1 width=0) (actual time=0.016..0.016 rows=4 loops=1) |
Index Cond: (value ~~ '%people%'::text) |
-> Bitmap Index Scan on quotes_idx (cost=0.00..20.00 rows=1 width=0) (actual time=0.008..0.008 rows=1 loops=1) |
Index Cond: (value ~~ '%person%'::text) |
Planning Time: 0.157 ms |
Execution Time: 0.058 ms |
QUERY PLAN |
---|
Bitmap Heap Scan on quotes (cost=12.26..16.77 rows=1 width=32) (actual time=0.023..0.024 rows=5 loops=1) |
Recheck Cond: (to_tsvector('english'::regconfig, value) @@ to_tsquery('people | person'::text)) |
Heap Blocks: exact=1 |
-> Bitmap Index Scan on quotes_tsvector_idx (cost=0.00..12.25 rows=1 width=0) (actual time=0.019..0.019 rows=5 loops=1) |
Index Cond: (to_tsvector('english'::regconfig, value) @@ to_tsquery('people | person'::text)) |
Planning Time: 0.086 ms |
Execution Time: 0.045 ms |