473,406 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

phppgadmin, pkey's and indexes

CSN
In phppgadmin, primary keys are added/shown under
"constraints". Does creating a primary key
automatically create an index? No indexes are listed
under phppgadmin's indexes page, but "\d table" in
psql shows indexes for primary keys.

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #1
3 4352
On Sun, Dec 28, 2003 at 10:42:32PM -0800, CSN wrote:
In phppgadmin, primary keys are added/shown under
"constraints". Does creating a primary key
automatically create an index? No indexes are listed
under phppgadmin's indexes page, but "\d table" in
psql shows indexes for primary keys.


From the documentation for CREATE TABLE:

"PostgreSQL automatically creates an index for each unique constraint
and primary key constraint to enforce the uniqueness. Thus, it is not
necessary to create an explicit index for primary key columns."

http://www.postgresql.org/docs/curre...eatetable.html

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #2
CSN <co*******************@yahoo.com> writes:
Does creating a primary key
automatically create an index?


Yup.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #3
CSN

--- Tom Lane wrote:
Does creating a primary key
automatically create an index?
Yup.


BTREE's only?

CSN

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: 7 | last post by:
I installed postgres and phppgadmin debian unstable (on ProMepis RC4) but I can't seem to access it. I type http://localhost/phppgadmin and it says file not found. Look in /var/www and sure...
1
by: Sean | last post by:
Hi all, I have two databases set up, one for development and one for production. They are almost identical. I noticed that a query was taking about 6.7 seconds to execute on the development...
2
by: eClaire | last post by:
Hello, I'm new in this list. First, scuse me for my not very good english and please speak me in simple words ;) I had install postgresql on my debian, no problem. I have too phppgadmin and...
1
by: Daniel Secomb | last post by:
Hi, I'm using PostgreSQL 7.3.4 with phpPgAdmin 2.4.2 and the ".sql" file I'm trying to import came from a dump from a server running PostgreSQL 7.0.3. I just got this error message trying to...
2
by: Eric | last post by:
Hi, My webserver work in PHP4, safemode and it's running for years. I use Debian, kernel 2.6 since yesterday. I install psotgreSQL and PHPPGADMIN from apt-get (in .deb package) like always...
3
by: Chris Green | last post by:
I'm not sure if this is really on topic for this list but I'll start here. I'm trying to run phpPgAdmin, I've installed version 3.5, I have postgresql version 7.4.3 running on slackware 9.1. ...
2
by: John Oliver | last post by:
I have a Fedora Core 2 box with MySQL and phpMyAdmin running just fine. I want to add PostGreSQL and phpPgAdmin I installed: php-pgsql-4.3.10-2.4.i386.rpm postgresql-7.4.7-3.FC2.1.i386.rpm...
14
by: Jeff | last post by:
This is the first time that I remember ever having too many indexes on a table, but it has happened. I have en employees table and store in many places, on tables, the id of the employee that...
3
by: Dan99 | last post by:
I am not sure if I should post this here or in a potgre group, but I will start here. I recently got a new server and thus when I copied all the files to the new machine, I logically decided to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.