Добрый день!
Я добавил нового пользователя в систему, запросил лицензии, импортировал их.
В данный момент пытаюсь зайти под новым пользователем и загрузка зависает на 5 минут. Система мониторинга сервера показывает почти 100%-ную загрузку процессом fbserver. При подключении к БД через TCP/IP программа после длительного зависания загружается, а через Web-сервис открыть её не представляется возможным по тайм-ауту.
Проблема проявляется исключительно по отношению к новому пользователю. Перезагрузка сервера и клиентов не помолга. Проблема частично исчезает, если не трогать папки Cache и Profile, но иногда их приходится очищать. Что сделать для устранения проблемы?
Данные:
Версия: Terrasoft 3.3.0.78
Продукт: TS CRM X25
Клиентские ОС Windows XP SP3, Клиент FB: 2.1
Серверная ОС: Ubuntu Linux 12.04, Firebird 2.1
Нравится
Опытным путём установил, что вешается на запросе
SELECT "ID", "Name", "Communication1", "Communication2", "CityName", "CityID", "CountryID", "StateID", "AccountTypeID", "AccountTypeName", "TaxRegistrationCode", "IntegrationID", "id_kadrovoi", "OwnerID", "OwnerName" FROM ( SELECT DISTINCT "tbl_Account"."ID" AS "ID", "tbl_Account"."Name" AS "Name", "tbl_Account"."Communication1" AS "Communication1", "tbl_Account"."Communication2" AS "Communication2", "tbl_City"."Name" AS "CityName", "tbl_Account"."CityID" AS "CityID", "tbl_Account"."CountryID" AS "CountryID", "tbl_Account"."StateID" AS "StateID", "tbl_Account"."AccountTypeID" AS "AccountTypeID", "tbl_AccountType"."Name" AS "AccountTypeName", "tbl_Account"."TaxRegistrationCode" AS "TaxRegistrationCode", "tbl_Account"."IntegrationID" AS "IntegrationID", "tbl_Account"."id_kadrovoi" AS "id_kadrovoi", NULL AS "OwnerID", NULL AS "OwnerName" FROM "vw_Account" AS "tbl_Account" LEFT OUTER JOIN "vw_City" AS "tbl_City" ON "tbl_City"."ID" = "tbl_Account"."CityID" LEFT OUTER JOIN "tbl_AccountType" AS "tbl_AccountType" ON "tbl_AccountType"."ID" = "tbl_Account"."AccountTypeID" LEFT OUTER JOIN "vw_Contact" AS "Owners" ON "Owners"."ID" = NULL ORDER BY 15 ASC ) ROWS 1 TO 40
А именно, если присутствует
LEFT OUTER JOIN "vw_Contact" AS "Owners" ON "Owners"."ID" = NULL
по-отдельности все View отрабатывают нормально. Индекс не построен что ли?
А запрос под другим пользователем представляет собой:
SELECT "ID", "Name", "Communication1", "Communication2", "CityName", "CityID", "CountryID", "StateID", "AccountTypeID", "AccountTypeName", "TaxRegistrationCode", "IntegrationID", "id_kadrovoi", "OwnerID", "OwnerName" FROM ( SELECT DISTINCT "tbl_Account"."ID" AS "ID", "tbl_Account"."Name" AS "Name", "tbl_Account"."Communication1" AS "Communication1", "tbl_Account"."Communication2" AS "Communication2", "tbl_City"."Name" AS "CityName", "tbl_Account"."CityID" AS "CityID", "tbl_Account"."CountryID" AS "CountryID", "tbl_Account"."StateID" AS "StateID", "tbl_Account"."AccountTypeID" AS "AccountTypeID", "tbl_AccountType"."Name" AS "AccountTypeName", "tbl_Account"."TaxRegistrationCode" AS "TaxRegistrationCode", "tbl_Account"."IntegrationID" AS "IntegrationID", "tbl_Account"."id_kadrovoi" AS "id_kadrovoi", "tbl_AccountOwner"."OwnerID" AS "OwnerID", "Owners"."Name" AS "OwnerName" FROM "vw_Account" AS "tbl_Account" LEFT OUTER JOIN "vw_City" AS "tbl_City" ON "tbl_City"."ID" = "tbl_Account"."CityID" LEFT OUTER JOIN "tbl_AccountType" AS "tbl_AccountType" ON "tbl_AccountType"."ID" = "tbl_Account"."AccountTypeID" LEFT OUTER JOIN "vw_AccountOwner" AS "tbl_AccountOwner" ON "tbl_AccountOwner"."AccountID" = "tbl_Account"."ID" LEFT OUTER JOIN "vw_Contact" AS "Owners" ON "Owners"."ID" = "tbl_AccountOwner"."OwnerID" ORDER BY 15 ASC ) ROWS 1
то есть, заместо NULL должны быть:
1. "tbl_AccountOwner"."OwnerID"
2. "Owners"."Name"
3. "tbl_AccountOwner"."OwnerID"
и в-четвёртых, в первом случае отсутствует доп join:
LEFT OUTER JOIN "vw_AccountOwner" AS "tbl_AccountOwner" ON "tbl_AccountOwner"."AccountID" = "tbl_Account"."ID"
И де мне их взять?
Решил проблему. Надо было пользователя в группу добавить