dbTalk Databases Forums  

Optimization questions and constant tables

comp.databases.postgresql comp.databases.postgresql


Discuss Optimization questions and constant tables in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
dblearner
 
Posts: n/a

Default Optimization questions and constant tables - 07-06-2007 , 09:04 AM






Hi there

- Is there a way to specify/force that a certain index should stay in
memory? (Suppose I have enough RAM to hold it)

- My tables never change. The data contained is constant. Is there a way
to tell this to Postgresql so that it can perform additional
optimizations? (I am aware of the possibility of index clustering.
Anything else?)

- I often perform complex queries A1, A2, A3 which are not identical but
they have in common some identical subqueries. E.g. A1 uses subquery
B1,C,D,E1, complex query A2 uses subqueries B2,C,D,E2 and so on (C,D in
common with A1, identical...). Is there a way to make Postgresql
permanently store the results of a certain number of the last subqueries
it performs, so that A2 and A3 would be greatly sped up when performed
after A1?

Thanks.

Reply With Quote
  #2  
Old   
dblearner
 
Posts: n/a

Default Re: Optimization questions and constant tables - 07-09-2007 , 07:41 AM






Sascha Bohnenkamp wrote:
Quote:
- I often perform complex queries A1, A2, A3 which are not identical but
they have in common some identical subqueries.

materialized views may help

Thanks but it's probably not what I am looking for: I would need to make
materialized views by hand before or after A1... this is not the
scenario I am thinking about.

At the time I perform A1 I cannot foresee that I will need A2, and at
the time I perform A2 I cannot foresee that I will need A3 etc. Then the
week after I perform another long list of queries that have in common
the same subqueries among them but are not in common with A1,A2,A3... so
it's a hassle to do it by hand with materialized views.
The optimization I am talking about cannot be manual. I just want that
the database remembers the last N subqueries it performed. It is strange
that there is no such optimization in postgres, that would seem an
obvious optimization to me!?
Any other relational database software has such an option?

Thanks


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.