Bookmarks
Account
ACL
Tools
New
Other
New Table: Indexes, Keys
Think of an Index as being much the same as an Index in a book.  If you are trying to find the phone number of Henry Hemma in the NYC phonebook, it would be unwise to begin at AAAA and scroll down 1 name at a time until you reach Hemma, Henry.
Once an index is created, no further intervention is required: the system will update the index when the table is modified, and it will use the index in queries when it thinks this would be more efficient than a sequential table scan.
An index defined on a column that is part of a join condition can significantly speed up queries with joins.
Younicycle helps you supplement the Structure of a Table by allowing you to add or designate:- Index Below are automatically indexed- Unique keys - Multicolumn keys (select > 1 row in the interface)- Foreign keys
A complete discussion of Keys & when to use them is beyond the scope of this short Tutorial.One advantage of Younicycle is that you can experiment - and test.  Another is that you can work with an Expert - and learn.
New TableIndexesKeys
2 1
3
4
5
6
7
8
9
10
11
New Table
Name Describe
Add Columns
DataTypes
TableStructure
TableOptions
DataEntry
ImportData
StoreExport
AddConstraints
Indexes Keys
Foreign key discussion (click image)
A table can have at most one primary key. (There can be any number of unique and not-null constraints, which are functionally the same thing, but only one can be identified as the primary key.)  Relational database theory dictates that every table must have a primary key. This rule is not enforced by PostgreSQL.
The Master Younicycle DB holds the Primary key & users do not have direct access to this functionality.  However, a User can create a combination of:
- Unique +- A Not Null Constraint
and as discussed above, it will have the same functionality.
Primary key discussion (from PostgreSQL Manual)
Click - Add Row
Select Type 'Unique' ... Select field (Column) 'ee_id'Click Save
Step 1
Step 2
Notice that you now have a 'U' as a key and a 'Y' as an additional Constraint.'ee_id' must be Unique AND 'ee_id' must be < 999 (from prevous page (Constraints))
After an index is created, the system has to keep it synchronized with the table. This adds overhead to data manipulation operations. Therefore indexes that are seldom or never used in queries should be removed.
select multiple columns if you want a multicolumn index(combination key)