Ticket #1484854 (closed Feature Requests: fixed)

Opened 9 months ago

Last modified 8 months ago

no indices in postgres database schema bug + DDL improvements

Reported by: alec Owned by:
Priority: 5 Milestone: 0.1.1
Component: Database Version: 0.1-stable
Severity: normal Keywords:
Cc:

Description

1. postgres is not creating indices for "REFERENCES" columns, so we must to create them explicitly: CREATE INDEX contacts_user_id_idx ON contacts (user_id); CREATE INDEX identities_user_id_idx ON identities (user_id); CREATE INDEX cache_user_id_idx ON cache (user_id); CREATE INDEX cache_session_id_idx ON cache (session_id);

2. also I think that few indices defined in mysql ddl script aren't used at all and can be removed, i.e. messages/uid, message/idx, also cache/cache_key

3. Proposition for new indices: CREATE INDEX users_username_id_idx ON users (username); CREATE INDEX users_alias_id_idx ON users (alias); they are used by query in function rcube_user::query()

Change History

Changed 8 months ago by alec

Also ON DELETE CASCADE should be used, because when I delete user (remove account from mail server), all referenced data should be deleted automatically.

Changed 8 months ago by till

  • type changed from Bugs to Feature Requests

Can you supply a patch for your requests?

Changed 8 months ago by thomasb

2. is fixed in r1218

Changed 8 months ago by alec

  • status changed from new to closed
  • resolution set to fixed

Fixed in r1242

Note: See TracTickets for help on using tickets.