Hi! Yes, i know, mvcc, and can't use indexes. And i know the workaround for max() and min(). Is there some workaround for count()? select count(*) from table where field=1; and field has a nice index. And this is slooooow. -- Tomka Gergely Tudom, anyu. Sapka, sál, doksi.
On Fri, Jan 07, 2005 at 19:22:56 +0100, Tomka Gergely <tomka@zeus.gau.hu> wrote: > Hi! > > Yes, i know, mvcc, and can't use indexes. And i know the workaround for > max() and min(). Is there some workaround for count()? > > select count(*) from table where field=1; > > and field has a nice index. And this is slooooow. If there are few records where field=1 then an index will be used. You may get better performance maintaining a count table using triggers. This may not work well of there are lots of concurrent updates.
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера