|
03.11.2016, 11:07
#39340606
Ссылка:
Ссылка на сообщение:
Ссылка с названием темы:
Ссылка на профиль пользователя:
|
|
|
Участник
Откуда: Белый город
Сообщения: 16 205
Рейтинг:
0
/ 0
|
|
|
|
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22.
explain analyze
select * from public.object WHERE (public.object.url_marker='shkafy')
"Append (cost=0.00..2573.00 rows=35 width=833) (actual time=10.088..10.171 rows=1 loops=1)"
" -> Seq Scan on object (cost=0.00..0.00 rows=1 width=947) (actual time=0.001..0.001 rows=0 loops=1)"
" Filter: ((url_marker)::text = 'shkafy'::text)"
" -> Seq Scan on brand (cost=0.00..0.00 rows=1 width=947) (actual time=0.000..0.000 rows=0 loops=1)"
" Filter: ((url_marker)::text = 'shkafy'::text)"
" -> Seq Scan on category (cost=0.00..0.00 rows=1 width=947) (actual time=0.000..0.000 rows=0 loops=1)"
" Filter: ((url_marker)::text = 'shkafy'::text)"
" -> Seq Scan on collection (cost=0.00..0.00 rows=1 width=947) (actual time=0.000..0.000 rows=0 loops=1)"
" Filter: ((url_marker)::text = 'shkafy'::text)"
" -> Seq Scan on feature (cost=0.00..0.00 rows=1 width=947) (actual time=0.000..0.000 rows=0 loops=1)"
" Filter: ((url_marker)::text = 'shkafy'::text)"
" -> Seq Scan on page (cost=0.00..0.00 rows=1 width=947) (actual time=0.000..0.000 rows=0 loops=1)"
" Filter: ((url_marker)::text = 'shkafy'::text)"
" -> Seq Scan on post (cost=0.00..0.00 rows=1 width=947) (actual time=0.000..0.000 rows=0 loops=1)"
" Filter: ((url_marker)::text = 'shkafy'::text)"
" -> Seq Scan on product (cost=0.00..0.00 rows=1 width=947) (actual time=0.000..0.000 rows=0 loops=1)"
" Filter: ((url_marker)::text = 'shkafy'::text)"
" -> Seq Scan on promo (cost=0.00..0.00 rows=1 width=947) (actual time=0.000..0.000 rows=0 loops=1)"
" Filter: ((url_marker)::text = 'shkafy'::text)"
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37.
CREATE TABLE public.object
(
id integer NOT NULL DEFAULT nextval('object_id_seq'::regclass),
_data jsonb,
added timestamp without time zone DEFAULT now(),
updated timestamp without time zone,
deleted timestamp without time zone,
disabled boolean NOT NULL DEFAULT false,
sort_id integer NOT NULL DEFAULT 0,
url_marker character varying(1024) DEFAULT NULL::character varying,
object_type_id smallint, -- Тип объекта, задается константой в каждой модели
flags integer,
ext_id character varying, -- внешний ИД, например из 1С-ки
created_by integer,
updated_by integer,
guid_1c character varying(64), -- GUID идентификатор объекта в 1С
region_id integer[] NOT NULL DEFAULT '{}'::integer[],
route_type_id smallint,
redirect_data jsonb,
page_type_id smallint,
ext_data jsonb,
old_data jsonb,
old_id character varying,
status_id smallint NOT NULL DEFAULT 0,
external_id integer, -- ИД из схемы external
sitemap_category_id integer,
CONSTRAINT object_pkey PRIMARY KEY (id)
)
WITH (
OIDS=FALSE
);
ALTER TABLE public.object
OWNER TO homeme;
COMMENT ON COLUMN public.object.object_type_id IS 'Тип объекта, задается константой в каждой модели';
COMMENT ON COLUMN public.object.ext_id IS 'внешний ИД, например из 1С-ки';
COMMENT ON COLUMN public.object.guid_1c IS 'GUID идентификатор объекта в 1С';
COMMENT ON COLUMN public.object.external_id IS 'ИД из схемы external';
|
|
|