->  Index Scan using companies_company_pkey on companies_company  (cost=0.14..0.26 rows=1 width=408)
                  
                  
                                                                                                   Index Cond: (id = employees_employee.company_id)
                  
                  
                                                                                       ->  Index Scan using common_currency_code_d8d55c3e_like on common_currency  (cost=0.14..0.27 rows=1 width=172)
                  
                  
                                                                                             Index Cond: ((code)::text = (companies_company.currency_id)::text)
                  
                  
                                                                                 ->  Index Scan using employees_group_pkey on employees_group  (cost=0.14..0.25 rows=1 width=124)
                  
                  
                                                                                       Index Cond: (id = employees_employee.group_id)
                  
                  
                                                                           ->  Index Scan using companies_company_pkey on companies_company t8  (cost=0.14..0.31 rows=1 width=408)
                  
                  
                                                                                 Index Cond: (id = employees_group.company_id)
                  
                  
                                                                     ->  Index Scan using common_currency_code_d8d55c3e_like on common_currency t9  (cost=0.14..0.27 rows=1 width=172)
                  
                  
                                                                           Index Cond: ((code)::text = (t8.currency_id)::text)
                  
                  
                                                               ->  Index Scan using employees_employee_pkey on employees_employee t10  (cost=0.27..0.29 rows=1 width=149)
                  
                  
                                                                     Index Cond: (id = orders_order.employee_id)
                  
                  
                                                         ->  Index Scan using companies_company_pkey on companies_company t11  (cost=0.14..0.26 rows=1 width=408)
                  
                  
                                                               Index Cond: (id = t10.company_id)
                  
                  
                                                   ->  Index Scan using common_currency_code_d8d55c3e_like on common_currency t12  (cost=0.14..0.27 rows=1 width=172)
                  
                  
                                                         Index Cond: ((code)::text = (t11.currency_id)::text)
                  
                  
                                             ->  Index Scan using employees_group_pkey on employees_group t13  (cost=0.14..0.25 rows=1 width=124)
                  
                  
                                                   Index Cond: (id = t10.group_id)
                  
                  
                                       ->  Index Scan using companies_company_pkey on companies_company t14  (cost=0.14..0.31 rows=1 width=408)
                  
                  
                                             Index Cond: (id = t13.company_id)
                  
                  
                                 ->  Index Scan using common_currency_code_d8d55c3e_like on common_currency t15  (cost=0.14..0.27 rows=1 width=172)
                  
                  
                                       Index Cond: ((code)::text = (t14.currency_id)::text)
                  
                  
                           ->  Hash Join  (cost=1.25..8.62 rows=101 width=580)
                  
                  
                                 Hash Cond: ((t16.currency_id)::text = (t17.code)::text)
                  
                  
                                 ->  Seq Scan on companies_company t16  (cost=0.00..7.01 rows=101 width=408)
                  
                  
                                 ->  Hash  (cost=1.11..1.11 rows=11 width=172)
                  
                  
                                       ->  Seq Scan on common_currency t17  (cost=0.00..1.11 rows=11 width=172)
                  
                  
                  (58 rows)
                  
                  
                  
                  
                  
                  Коллеги, я не вижу проблему, подскажите, может не заметил?
                  
                  
                
Выложите в нормальном виде запрос и план, не особо читабельно это
Обсуждают сегодня