Re: [GENERAL] Index on a view??
Ragnar HafstaĆ° wrote: On Wed, 2005-01-05 at 13:03 -0800, Jeff Davis wrote: On Wed, 2005-01-05 at 13:14 -0700, Michael Fuhr wrote: On Wed, Jan 05, 2005 at 08:15:28PM +0100, Joost Kraaijeveld wrote: [snip] PostgreSQL doesn't have materialized views per se but it does have functionality that can implement them. Can you tell me what you mean by that? triggers, maybe ? gnari Specifically, info can be found here: http://jonathangardner.net/PostgreSQL/materialized_views/matviews.html Jeff ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
Re: [GENERAL] Index on a view??
On Wed, 2005-01-05 at 13:03 -0800, Jeff Davis wrote: > On Wed, 2005-01-05 at 13:14 -0700, Michael Fuhr wrote: > > On Wed, Jan 05, 2005 at 08:15:28PM +0100, Joost Kraaijeveld wrote: > > [snip] > > > PostgreSQL > > doesn't have materialized views per se but it does have functionality > > that can implement them. > > > > Can you tell me what you mean by that? triggers, maybe ? gnari ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] Index on a view??
Jeff Davis wrote: On Wed, 2005-01-05 at 13:14 -0700, Michael Fuhr wrote: On Wed, Jan 05, 2005 at 08:15:28PM +0100, Joost Kraaijeveld wrote: [snip] PostgreSQL doesn't have materialized views per se but it does have functionality that can implement them. Can you tell me what you mean by that? You can use triggers to create your materialized views. Regards, Jeff Davis ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org -- Command Prompt, Inc., home of PostgreSQL Replication, and plPHP. Postgresql support, programming shared hosting and dedicated hosting. +1-503-667-4564 - [EMAIL PROTECTED] - http://www.commandprompt.com Mammoth PostgreSQL Replicator. Integrated Replication for PostgreSQL begin:vcard fn:Joshua D. Drake n:Drake;Joshua D. org:Command Prompt, Inc. adr:;;PO Box 215;Cascade Locks;Oregon;97014;USA email;internet:[EMAIL PROTECTED] title:Consultant tel;work:503-667-4564 tel;fax:503-210-0334 note:Command Prompt, Inc. is the largest and oldest US based commercial PostgreSQL support provider. We provide the only commercially viable integrated PostgreSQL replication solution, but also custom programming, and support. We authored the book Practical PostgreSQL, the procedural language plPHP, and adding trigger capability to plPerl. x-mozilla-html:FALSE url:http://www.commandprompt.com/ version:2.1 end:vcard ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [GENERAL] Index on a view??
On Wed, 2005-01-05 at 13:14 -0700, Michael Fuhr wrote: > On Wed, Jan 05, 2005 at 08:15:28PM +0100, Joost Kraaijeveld wrote: [snip] > PostgreSQL > doesn't have materialized views per se but it does have functionality > that can implement them. > Can you tell me what you mean by that? Regards, Jeff Davis ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] Index on a view??
On Wed, Jan 05, 2005 at 08:15:28PM +0100, Joost Kraaijeveld wrote: > > Is it possible to create an index on a view? Querying a view should use indexes if the underlying tables have indexes and the planner can figure out how to use them. For complex queries you might need to use a materialized view. PostgreSQL doesn't have materialized views per se but it does have functionality that can implement them. What problem are you trying to solve? Can you give us an example of what you're trying to do? -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [GENERAL] Index on a view??
No, you can only create an index on the underlying tables. A view is a virtual realtion, not a physical one, so what would the index point to? Any functionality you need you should be able to get with functional indexes. Perhaps if/when postgresql gets materialized views an index on a view might be useful. Regards, Jeff Davis On Wed, 2005-01-05 at 20:15 +0100, Joost Kraaijeveld wrote: > Hi all, > > Is it possible to create an index on a view? > > Groeten, > > Joost Kraaijeveld > Askesis B.V. > Molukkenstraat 14 > 6524NB Nijmegen > tel: 024-3888063 / 06-51855277 > fax: 024-3608416 > e-mail: [EMAIL PROTECTED] > web: www.askesis.nl > > ---(end of broadcast)--- > TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
[GENERAL] Index on a view??
Hi all, Is it possible to create an index on a view? Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 e-mail: [EMAIL PROTECTED] web: www.askesis.nl ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]