Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Pass down projection information #16

Open
Eulerizeit opened this issue Jul 2, 2020 · 3 comments
Open

Pass down projection information #16

Eulerizeit opened this issue Jul 2, 2020 · 3 comments

Comments

@Eulerizeit
Copy link

This is a subset of issue #13

We closed the scan cols patch in Postgres this is an issue that when finished will replace that patch with, most likely, several patches.

Included in the patch set will be:

  • extracting columns for scans -- this is before the table AM before or during the plan
  • extracting columns for returning -- this is before the table AM before or during the plan
  • TableAM modifications for passing columns for scan (index and sequential)
  • TableAM modifications for passing columns for operations where we fetch a row by TID (returning, insert on conflict, etc.)
  • TableAM modifications for passing columns for operations where we lock a tuple

Effectively this should be decoupling the ingrained assumptions that a 'row' is the atomic thing being grabbed.

@Eulerizeit
Copy link
Author

From a previous investigation on improvements for scan:

Column store layout can be leveraged to scan only subset of columns from table which are requied to perform the task. Following functions don't need to pull full tuple but can be optimized to only get required subset of columns.

Sequential Scan to leverage column projections

  • check_default_partition_contents()
  • CopyTo()
  • validateCheckConstraint()
  • validateForeignKeyConstraint()

Index Scans to leverage column projections

  • table_index_fetch_tuple_check()
  • unique_key_recheck()
  • check_exclusion_or_unique_constraint()
  • IndexNextWithReorder()
  • get_actual_variable_range()

&&

@ashwinstar modified following functions to leverage column projections.

  • check_default_partition_contents()
  • CopyTo()
  • validateCheckConstraint()
    Rest mentioned above are still remaining.

@soumyadeep2007
Copy link

ExecInitBitmapHeapScan() should also pass down the projection list if possible.

@soumyadeep2007
Copy link

w/ @jchampio
validateCheckConstraint() was removed in upstream commit: f1fcf2d. So we don't need to worry about it anymore.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants