[GENERAL] Question regarding the output of postgresql *explain* command

Поиск
Список
Период
Сортировка
От Arup Rakshit
Тема [GENERAL] Question regarding the output of postgresql *explain* command
Дата
Msg-id F7D0CBEF-3C12-41F1-8555-26F517E95561@outlook.com
обсуждение исходный текст
Ответы Re: [GENERAL] Question regarding the output of postgresql *explain* command  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi,


I was reading to day how indexing works. And I was trying some query, for example below one. What the range basically means (cost=0.28..8.30 ? I don’t understand this.


———————————

arup@ror ~/part-time-projects/entrylvl (add_index_to_job_sources)$ rails db
psql (9.5.0)
Type "help" for help.

entrylvl_dev=# \d job_sources;                                      Table "public.job_sources"   Column     |            Type             |                        Modifiers
---------------+-----------------------------+----------------------------------------------------------id            | bigint                      | not null default nextval('job_sources_id_seq'::regclass)job_id        | bigint                      |source        | character varying           |job_source_id | character varying           |created_at    | timestamp without time zone | not nullupdated_at    | timestamp without time zone | not null
Indexes:   "job_sources_pkey" PRIMARY KEY, btree (id)   "index_job_sources_on_source_and_job_source_id" UNIQUE, btree (source, job_source_id)   "index_job_sources_on_job_id" btree (job_id)
Foreign-key constraints:   "fk_rails_f45da00eca" FOREIGN KEY (job_id) REFERENCES jobs(id)

entrylvl_dev=# explain select * from job_sources where job_source_id = 'p_1208b146c9eb8905' AND source = 'indeed';                                                   QUERY PLAN
------------------------------------------------------------------------------------------------------------------Index Scan using index_job_sources_on_source_and_job_source_id on job_sources  (cost=0.28..8.30 rows=1 width=58)  Index Cond: (((source)::text = 'indeed'::text) AND ((job_source_id)::text = 'p_1208b146c9eb8905'::text))
(2 rows)

entrylvl_dev=#

—————————


Thanks,
Arup

В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: [GENERAL] Help with terminology to describe what my software doesplease?
Следующее
От: Melvin Davidson
Дата:
Сообщение: Re: [GENERAL] Help with terminology to describe what my software does please?