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?.
1 rows affected
1 rows affected
1 rows affected
1 rows affected
1 rows affected
1 rows affected
1 rows affected
1 rows affected
1 rows affected
1 rows affected
1 rows affected
1 rows affected
1 rows affected
1 rows affected
type_key | name | default_value |
---|---|---|
1 | DOB | 1/1/1950 |
2 | First_name | Sample |
3 | Last_name | Sample1 |
4 | Contact | 888888 |
obj_key | type_key | status | v_date | v_text | v_number | updated_on |
---|---|---|---|---|---|---|
1 | 1 | active | {"1987-06-04 00:00:00"} | null | null | 2021-06-04 00:00:00 |
1 | 2 | active | null | {GB} | null | 2021-05-04 00:00:00 |
1 | 3 | active | null | null | null | 2021-06-07 00:00:00 |
1 | 4 | active | null | null | null | 2021-06-04 00:00:00 |
2 | 1 | active | {"1988-06-04 00:00:00"} | null | null | 2020-06-07 00:00:00 |
2 | 2 | active | null | {Nick} | null | 2020-05-04 00:00:00 |
2 | 3 | deleted | null | {Jerry} | null | 2019-06-04 00:00:00 |
2 | 4 | active | null | null | {569251} | 2020-06-04 00:00:00 |
3 | 2 | active | null | {Goerge} | null | 2021-01-04 00:00:00 |
3 | 3 | active | null | {M} | null | 2020-06-04 00:00:00 |
obj_key | updated_on | status | DOB | First Name | Last Name | Contact |
---|---|---|---|---|---|---|
3 | 2021-01-04 00:00:00 | active | null | Goerge | M | null |
2 | 2020-06-07 00:00:00 | deleted | 1988-06-04 00:00:00 | Nick | Jerry | 569251 |
1 | 2021-06-07 00:00:00 | active | 1987-06-04 00:00:00 | GB | null | null |
obj_key | updated_on | status | DOB | First Name | Last Name | Contact |
---|---|---|---|---|---|---|
3 | 2021-01-04 00:00:00 | active | 1/1/1950 | Goerge | M | 888888 |
2 | 2020-06-07 00:00:00 | deleted | 1988-06-04 00:00:00 | Nick | Jerry | 569251 |
1 | 2021-06-07 00:00:00 | active | 1987-06-04 00:00:00 | GB | Sample1 | 888888 |
ERROR: syntax error at or near "OVER"
LINE 4: ...elect default_value from types where type_key=1)) OVER w as ...
^