| От | Greg Stark |
|---|---|
| Тема | Re: How would you store read/unread topic status? |
| Дата | |
| Msg-id | 407d949e0906231648x7b1bb17ft3a537082b4dc4cb@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: How would you store read/unread topic status? (Mathieu Nebra <mateo21@siteduzero.com>) |
| Список | pgsql-performance |
On Tue, Jun 23, 2009 at 9:04 PM, Mathieu Nebra<mateo21@siteduzero.com> wrote: > We have indexes on them, so we can SELECT every topic WHERE the user has > written. Is it the good way of doing this? I'm kind of skeptical that a simple index on userid,topic isn't sufficient to handle this case. But you would have to test it on actual data to be sure. It depends whether you have enough topics and enough userid,topic records for a given userid that scanning all the topics for a given user is actually too slow. Even if it's necessary you might consider having a "partial" index on user,topic WHERE writtenstatus instead of having a three-column index. -- greg http://mit.edu/~gsstark/resume.pdf
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера