Explain the difference between a hash join and a merge join, and describe when the query planner would choose one over the other.
Use PostgreSQL terminology and relate the explanation to the supplied membership query. State the relevant cost, input-ordering, memory, and data-volume considerations.
creator_id, creator_name, member_id, and membership_tier for matching membership records.creator_id, then member_id.| Column | Type | Description |
|---|---|---|
| creator_idPK | INT | Unique creator identifier |
| creator_name | VARCHAR(100) | Creator display name |
| creator_status | VARCHAR(20) | Current creator status |
| bio | TEXT | Optional creator biography |
| Column | Type | Description |
|---|---|---|
| member_idPK | INT | Unique membership identifier |
| creator_id | INT | Referenced creator identifier |
| membership_tier | VARCHAR(50) | Name of the membership tier |
| status | VARCHAR(20) | Membership lifecycle status |