Re: No heap lookups on index
От | Jim C. Nasby |
---|---|
Тема | Re: No heap lookups on index |
Дата | |
Msg-id | 20060119200317.GY78403@pervasive.com обсуждение исходный текст |
Ответ на | Re: No heap lookups on index (Josh Berkus <josh@agliodbs.com>) |
Список | pgsql-hackers |
On Thu, Jan 19, 2006 at 10:19:01AM -0800, Josh Berkus wrote: > One of the other most valuable targets for index-only access is the > "many-to-many join table" whose primary key consists of two (or more) > foreign keys to two (or more) other tables. It's actually not necessary > to check visibility on this kind of table as the visibility of tuples in > the join table will be determined by the visibility of tuples in the two > data tables. Since often join tables consist *only* of the join key, > being able to do index-only access on them could dramatically speed up > certian kinds of queries. How would that handle 'delinking' item A from foobaz 2? (IE: DELETE FROM join_table WHERE id1=231 and id2=24842) The only way I can see this working is if it is required that items in both tables as well as the link in the many-many table are only inserted and deleted in the same transaction, which seems to be really pushing this into corner-case territory. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
В списке pgsql-hackers по дате отправления: