Ticket #1484854 (closed Feature Requests: fixed)
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()
