Skip to content

Instantly share code, notes, and snippets.

@julietaansola
Last active April 16, 2021 18:16
Show Gist options
  • Save julietaansola/805d324a2451508f472bb9c9c67e6167 to your computer and use it in GitHub Desktop.
Save julietaansola/805d324a2451508f472bb9c9c67e6167 to your computer and use it in GitHub Desktop.
add index
CREATE INDEX account_index ON app.account(account_id)
CREATE INDEX movement_index ON app.movement(movement_id)
CREATE INDEX business_index ON app.business_sector(business_sector_id)
CREATE INDEX company_index ON app.company(company_id)
CREATE INDEX person_index ON app.person(account_id)
CREATE INDEX movement_index ON ledger.movement(id)
CREATE INDEX transaction_index ON ledger.transaction(transaction_id)
CREATE INDEX transaction_type_index ON ledger.transaction_type(transaction_type_id)
CREATE INDEX origin_index ON ledger.origin(origin_id)
CREATE INDEX business_index ON loyalty.businesses(id)
////
CREATE INDEX clients_index ON loyalty.clients(id)
CREATE INDEX client_point_index ON loyalty.points(client_id)
CREATE INDEX visits_client_index ON loyalty.visits(client_id)
CREATE INDEX external_ref_index ON ledger.origin(external_ref)
///
CREATE INDEX transaction_type_id_index ON ledger.transaction(transaction_type_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment