Robert Huber wrote:Hi Robert
Thanks for the hint to the manual. Saying overview, I meant the various possibilities for creating indexes, not the specific syntax. But it seems there is no help in the form of an analyzing and creation tool in pgAdminIII. Is there one in the DBWrench app?
There is no wizard or something for analyzing if a column needs an index or not like Sybase Central has. Although I believe something like that is planned.
As for creating/managing indices you can use DbWrench and other tools.
Robert Huber wrote:Creating a primary key constraint like
ALTER TABLE stations ADD PRIMARY KEY (id);
after creating the table with a stmt like
CREATE TABLE stations (altitude int4 , company_id int4 , ..., valid_sts_ht int4 NOT NULL);
does not create a primary key index.
But may be I didn't understand you correctly and you meant something different.
It implicitly creates an index for the primary key. I just tested it with psql and PgAdminIII.
The only thing is that PgAdminIII doesn't show the index as such. Psql however does show the index.
Actually psql explicitly tells you it does:
- Code: Select all
# ALTER TABLE stations ADD PRIMARY KEY (id);
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "stations_pkey" for table "stations"
ALTER TABLE
(also EXPLAIN SELECT * FROM stations WHERE id=?; will show it uses the index
)
Robert Huber wrote:PS: Did you receive my example where I can't suppress the horizontal slider?
Nope, did you email it to me or did you use the private mailbox on this forum?
Hope this helps.