This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Обзор обработки запросов | |
шаги: | |
компилирует и преобразует инструкцию SQL в выражение, состоящее из логических операций высокого уровня, называемое логический план; | |
оптимизирует логический план и превращает его в план выполнения; | |
выполняет (интерпретирует) план и возвращает результаты | |
Вывод компилятора запросов – это выражение, состоящее из высокоуровневых операций, которые остаются декларативными – они не дают | |
никаких инструкций о том, как получить требуемый результат. | |
Оптимизатор выполняет два вида преобразований: заменяет логические операции на алгоритмы выполнения и, возможно, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Есть таблица postgres | |
CREATE TABLE IF NOT EXISTS DOC_TYPE | |
( | |
DOC_TYPE_ID SERIAL PRIMARY KEY, | |
BEGIN_TIME timestamp with time ZONE NOT NULL DEFAULT '31.12.1970 23:59:59', | |
END_TIME timestamp with time ZONE DEFAULT '31.12.2049 23:59:59', | |
DESCRIPTION varchar(256) NOT NULL, | |
REGION_ID integer NOT NULL DEFAULT 16, | |
deleted bool NOT NULL DEFAULT false, | |
created_at timestamp with time zone NOT NULL DEFAULT now(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$mock = false; | |
$recepient = "+7987XXXXXXX"; | |
$gateway = "192.168.0.10"; | |
$user = "user"; | |
$password = "password"; | |
$method = "2"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://kb.isc.org/docs/isc-dhcp-44-manual-pages-dhcpdconf | |
# https://habr.com/ru/post/323984/ | |
# Это определяет, является ли сервер первичным или вторичным. Этот параметр должен быть указан. | |
[primary | secondary]; | |
# Объявляет IP-адрес или DNS-имя, по которому сервер должен прослушивать соединения | |
# от своего однорангового узла аварийного переключения, а также значение, используемое для идентификатора сервера | |
# протокола Failover DHCP. | |
address address; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
по п.1 | |
INSERT | |
user_id = 231704, created_at = 2020-04-08 11:02:38 | |
{ | |
"uid": {"n": "3605845", "o": null}, | |
"stage_id": {"n": "2376", "o": null}, | |
"created_at": {"n": "2020-04-08 11:02:38", "o": null}, | |
"geo_tag_id": {"n": "2325450", "o": null}, | |
"quarters_id": {"n": "11457020", "o": null}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ /** @var \Rgkh\Common\Base\Grid\BasePaginatorGrid $baseGrid */ | |
+ $baseGrid = $this->getServiceLocator()->get(BasePaginatorGrid::class); | |
+ return new Page(1, 1, ['total' => 1], ['data' => 'GetCleanSewageListGrid']); | |
{ | |
"jsonrpc": "2.0", | |
"method": "getPlumbingFacilitiesListIn", | |
"params": { | |
"reportingPeriodYear": "2019", | |
"aoGuid": "e3a88932-c76e-4158-842c-d710a9856df1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8583427 г. Барнаул, ул. Беляева, д. 18 | |
SELECT | |
hres.resettlement_type_id, r.name, hres.* | |
FROM new_reloc_contracts nrc | |
JOIN new_reloc_contracts_quarters nrcq ON nrcq.contract_id = nrc.id | |
JOIN house_resettlements hres ON hres.id = nrcq.house_resettlement_id AND hres.deleted_at IS NULL | |
JOIN refs r ON r.id = hres.resettlement_type_id | |
WHERE nrc.contract_number LIKE '12653%' AND nrc.deleted_at IS NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module/Common/Main/src/Main/Service/HousesPassportUpdater/UpdateableTargets/AgfAfter2012Houses.php:72 | |
/Version20161006143035_6899_update_ajf_houses.php:1 | |
resettlement_status_id | |
SELECT * FROM refs WHERE parent_id = 594 | |
blank, resettlement_await, owner_wanted, empty, in_court, resettled | |
SELECT | |
h.id AS house_id, | |
h.date_created, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH cte_reporting_period AS ( | |
SELECT id | |
FROM public.reporting_periods rp | |
WHERE rp."year" :: INT = :reportingPeriodYear AND rp."type" = :typeAssessmentStateSwss | |
) | |
SELECT | |
coalesce(to_char(pfm.updated_at, 'DD-MM-YYYY'), 'Не заполнено') AS "updatedTime", | |
pfm.plumbing_facilities_id AS "plumbingFacilities", | |
cr.inn AS "requisite", | |
coalesce(legal_form.name, 'Не заполнено') AS "legalForm", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH cte_data1 AS ( | |
SELECT | |
sf.dative AS sf_name, | |
mo.name AS mo_name, | |
vpd.documents_name AS document_name, | |
s.name AS status_name, | |
vpd.id AS volga_program_document_id | |
FROM volga_river_recovery.regional_programs rp | |
JOIN geo_tag_grammatical_cases sf ON sf.geo_tag_id = rp.geo_tag_id | |
JOIN volga_river_recovery.regional_programs_mun_areas rpma ON rpma.regional_program_id = rp.id AND rpma.deleted_at IS NULL |
NewerOlder