Re: Self-referencing table question
От | Sean Davis |
---|---|
Тема | Re: Self-referencing table question |
Дата | |
Msg-id | 62cd9fffe536b0665a1da78478c4ec20@mail.nih.gov обсуждение исходный текст |
Ответ на | Re: Self-referencing table question (Edmund Bacon <ebacon@onesystem.com>) |
Ответы |
Re: Self-referencing table question
|
Список | pgsql-sql |
On Mar 24, 2005, at 1:11 PM, Edmund Bacon wrote: > Sean Davis wrote: > >> Thanks. I thought about that a bit and it seems like it is highly >> likely to be expensive for a single query (though I should probably >> try it at some point). If I do find myself reformatting results >> after response to user input (i.e., reusing the query), though, then >> your solution is likely to be very useful. >> > > > Note that the subselect version takes about 10 times as long as the > temptable version, and does not seem to be dependent on what data > might be cached. >>> Nice. Thanks for doing my work for me! I guess I will have to think about it more seriously. It could be a slight bit complicated because my code is running under mod_perl, so connections are cached. As I understand it, the temp table will stick around, so I will have to be careful to explicitly drop it if I don't want it to persist? Also each table will need a unique name (I have a session_id I can use), as it is possible that multiple temp tables will exist and be visible to each other? Thanks again, Sean
В списке pgsql-sql по дате отправления: