Re: TPC-R benchmarks
От | Oleg Lebedev |
---|---|
Тема | Re: TPC-R benchmarks |
Дата | |
Msg-id | 993DBE5B4D02194382EC8DF8554A52731D7604@postoffice.waterford.org обсуждение исходный текст |
Ответ на | TPC-R benchmarks (Oleg Lebedev <oleg.lebedev@waterford.org>) |
Ответы |
Re: TPC-R benchmarks
Re: TPC-R benchmarks |
Список | pgsql-performance |
I continue struggling with the TPC-R benchmarks and wonder if anyone could help me optimize the query below. ANALYZE statistics indicate that the query should run relatively fast, but it takes hours to complete. I attached the query plan to this posting. Thanks. select nation, o_year, sum(amount) as sum_profit from ( select n_name as nation, extract(year from o_orderdate) as o_year, l_extendedprice * (1 - l_discount) - ps_supplycost * l_quantity as amount from part, supplier, lineitem, partsupp, orders, nation where s_suppkey = l_suppkey and ps_suppkey = l_suppkey and ps_partkey = l_partkey and p_partkey = l_partkey and o_orderkey = l_orderkey and s_nationkey = n_nationkey and p_name like '%aquamarine%' ) as profit group by nation, o_year order by nation, o_year desc; ************************************* This e-mail may contain privileged or confidential material intended for the named recipient only. If you are not the named recipient, delete this message and all attachments. Unauthorized reviewing, copying, printing, disclosing, or otherwise using information in this e-mail is prohibited. We reserve the right to monitor e-mail sent through our network. *************************************
Вложения
В списке pgsql-performance по дате отправления: