Statistics Injection

Поиск
Список
Период
Сортировка
От Victor Giannakouris - Salalidis
Тема Statistics Injection
Дата
Msg-id CALUSaSqG8CQN-hp+GDgH6WAM+E4JuiNeXOvQM9-ea2hz6HvVxg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Statistics Injection  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Statistics Injection  (Vladimir Sitnikov <sitnikov.vladimir@gmail.com>)
Список pgsql-hackers

Hello,

For some research purposes, I am trying to modify the existing statistics of some tables in the catalogs in order to change the execution plan, experiment with the EXPLAIN call etc.

Concretely, what I'd like to do is to create a "fake" table with a schema of my choice (that's the easy part) and then modify the statistics(particularly, the number of tuples and the number of pages).

Firstly, I create an empty table (CREATE TABLE newTable(....)) and then I update the pg_class table as well (UPDATE pg_class SET relpages = #pages WHERE relname='newTable'). 

The problem is that, even if I set the reltuples and relpages of my choice, when I run the EXPLAIN clause for a query in which the 'newTable'  is involved in (e.g. EXPLAIN SELECT * FROM newTable), I get the same cost and row estimation.

Could anyone help me with that?

Thank you in advance,

Victor Giannakouris

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Re: [ADMIN] problems using pg_start_backup/pg_stop_backup and pg_basebackup at same time
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: Bug in batch tuplesort memory CLUSTER case (9.6 only)