Modifying Postgresql Optimizer to select optimal memory

Поиск
Список
Период
Сортировка
От Sayan Biswas
Тема Modifying Postgresql Optimizer to select optimal memory
Дата
Msg-id CAPfq5ZW5MBafwg984-CwgfyG54M2zDWreYv=s3Nom=iSbCR9Rw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Modifying Postgresql Optimizer to select optimal memory  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello everyone,

We are currently working on a DBMS course project that requires us to modify postgresql optimizer. We need to vary work_mem within a range and note down the cost at those points(allocated memory) after 'explain' operation and then select the optimal tradeoff. We were changing "postgresql-9.1.12/src/backend/optimizer/plan/planner.c" where we created a new function mem_tradeoff() that calls planner() within a for loop for the varying memory. This mem_tradeoff() is called from pg_plan_query() in "postgresql-9.1.12/src/backend/tcop/postgres.c". The problem is, if the for loop runs only one iteration, everything is fine, but if we print plan->planTree->total_cost, it is printed 132 times for any query. Also if the for loop runs more than one iteration, we get a segmentation fault. Any help is very much appreciated.

Thank you,
Sayan

--
Don't kill the dream - execute it.
 

В списке pgsql-general по дате отправления:

Предыдущее
От: Robert DiFalco
Дата:
Сообщение: SQL Question
Следующее
От: Robert DiFalco
Дата:
Сообщение: Re: SQL Question