Re: Query optimization

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: Query optimization
Дата
Msg-id 1414547188335-5824744.post@n5.nabble.com
обсуждение исходный текст
Ответ на Query optimization  (Jorge Arevalo <jorgearevalo@libregis.org>)
Список pgsql-general
Jorge Arévalo-2 wrote
> So, I first generate a common table records_to_insert, using data from
> table1 and table2, and then call a function fill_table3_function, in order
> to insert the values into table3 (I do more things apart from insert,
> that's reason to call a function instead of just raising an insert query).
> There are indexes created on all the columns that need them.

I would suggest you figure out how to do what you need without pushing the
insert into the function.


> So, is there anything obviously wrong with my query? Any changes to make
> it
> faster?

You shouldn't expect much useful help when the important part of your query
is not provided.

Creating arrays and hstores is expensive but whether that is the biggest
factor is impossible to tell.

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/Query-optimization-tp5824739p5824744.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: Romu Hu
Дата:
Сообщение: Re: Need guidance on regression.diffs
Следующее
От: David G Johnston
Дата:
Сообщение: Re: Query optimization