Re: Counting the occurences of a substring within a very large text
| От | Marc Mamin |
|---|---|
| Тема | Re: Counting the occurences of a substring within a very large text |
| Дата | |
| Msg-id | B6F6FD62F2624C4C9916AC0175D56D8828BEA719@jenmbs01.ad.intershop.net обсуждение исходный текст |
| Ответ на | Re: Counting the occurences of a substring within a very large text (Chris Mair <chris@1006.org>) |
| Список | pgsql-general |
> -----Original Message----- > From: Chris Mair [mailto:chris@1006.org] > Sent: Mittwoch, 24. Juni 2015 13:26 > To: Marc Mamin; Postgres General > Subject: Re: [GENERAL] Counting the occurences of a substring within a > very large text > > > Hello, > > > > I'd like to count the number linebreaks within a string, but I get a > > memory allocation error when using regexp_matches or > regexp_split_to_table. > > > > Any idea for an alternative to this problem ? > > > > select count(*)-1 from > > ( select regexp_split_to_table(full_message,'(\n)', 'g') > > from mytable > > where id =-2146999703 > > )foo; > > > > ERROR: invalid memory alloc request size 1447215584 > > > > regards, > > > > Marc Mamin > > > > Hi, > > what's the size of full_message from mytable where id =-2146999703? 345 MB, Postgres 9.3.6 Marc Mamin > > Also: Postgres version? OS? any extensions installed? > > Bye, > Chris. >
В списке pgsql-general по дате отправления: