psql (9.3.14) Type "help" for help. perftestdb=# select count(*) from subscriber ; count -------- 100000 (1 row) perftestdb=# \d subscriber Table "public.subscriber" Column | Type | Modifiers --------------+-----------------------+----------- s_id | integer | not null sub_nbr | character varying(15) | not null bit_1 | smallint | bit_2 | smallint | bit_3 | smallint | bit_4 | smallint | bit_5 | smallint | bit_6 | smallint | bit_7 | smallint | bit_8 | smallint | bit_9 | smallint | bit_10 | smallint | hex_1 | smallint | hex_2 | smallint | hex_3 | smallint | hex_4 | smallint | hex_5 | smallint | hex_6 | smallint | hex_7 | smallint | hex_8 | smallint | hex_9 | smallint | hex_10 | smallint | byte2_1 | smallint | byte2_2 | smallint | byte2_3 | smallint | byte2_4 | smallint | byte2_5 | smallint | byte2_6 | smallint | byte2_7 | smallint | byte2_8 | smallint | byte2_9 | smallint | byte2_10 | smallint | msc_location | integer | vlr_location | integer | Indexes: "subscriber_pkey" PRIMARY KEY, btree (s_id) "subscriber_by_sub_nbr" UNIQUE, btree (sub_nbr) Referenced by: TABLE "access_info" CONSTRAINT "access_info_s_id_fkey" FOREIGN KEY (s_id) REFERENCES subscriber(s_id) TABLE "special_facility" CONSTRAINT "special_facility_s_id_fkey" FOREIGN KEY (s_id) REFERENCES subscriber(s_id) perftestdb=# explain analyze select * from subscriber where s_id = 100; QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- Index Scan using subscriber_pkey on subscriber (cost=0.29..8.31 rows=1 width=88) (actual time=0.049..0.055 rows=1 loops=1) Index Cond: (s_id = 100) Total runtime: 0.231 ms (3 rows) perftestdb=# explain analyze select * from subscriber where s_id = 100; QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- Index Scan using subscriber_pkey on subscriber (cost=0.29..8.31 rows=1 width=88) (actual time=0.059..0.066 rows=1 loops=1) Index Cond: (s_id = 100) Total runtime: 0.246 ms (3 rows) perftestdb=# explain analyze select * from subscriber where s_id = 100; QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- Index Scan using subscriber_pkey on subscriber (cost=0.29..8.31 rows=1 width=88) (actual time=0.059..0.066 rows=1 loops=1) Index Cond: (s_id = 100) Total runtime: 0.249 ms (3 rows) perftestdb=# explain analyze select * from subscriber where s_id = 100; QUERY PLAN ----------------------------------------------------------------------------------------------------------------------------- Index Scan using subscriber_pkey on subscriber (cost=0.29..8.31 rows=1 width=88) (actual time=0.056..0.062 rows=1 loops=1) Index Cond: (s_id = 100) Total runtime: 0.245 ms (3 rows) Configuration: max_connections = 100 shared_buffers = 128MB effective_cache_size = 256MB checkpoint_segments = 10 checkpoint_timeout = 180s wal_keep_segments = 10 archive_command = 'rm ./Archive_*; touch ./Archive_"%f"; exit 0' archive_timeout = 0 #-- Some helpful logging to detect deadlock and IO load log_lock_waits = on log_checkpoints = on archive_mode = on tcp_keepalives_idle = 15 tcp_keepalives_interval = 5 tcp_keepalives_count = 3 max_wal_senders = 5 wal_level = hot_standby hot_standby = on # REST ALL PARAMETERS ARE DEFAULT