Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 8CD2CB5DBC9 for ; Mon, 13 Jun 2011 22:59:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 40393-03 for ; Tue, 14 Jun 2011 01:58:55 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pv0-f174.google.com (mail-pv0-f174.google.com [74.125.83.174]) by mail.postgresql.org (Postfix) with ESMTP id 39EFAB5D80B for ; Mon, 13 Jun 2011 22:58:54 -0300 (ADT) Received: by pvg12 with SMTP id 12so2382816pvg.19 for ; Mon, 13 Jun 2011 18:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=q/LlbqlOT+ibUyZoOvnvlmiXM8tq/7vkcZ83Dm9nQpA=; b=pshBoaFKLyF4JkSc9bcxmddiEkcfz9B9vqJdhSDUyLZ+5OOOv/D2V485yt+BAhFj2l Vzqdl5ttaZMAvF1GyCp0kao49sNlYLn2k+OFueMyD+ltLom9BktBtz3m5gvewU4+0SyO Y7ZuHHT7doUHDk/Wqi1JTzvMHQnA4OwXlGjAg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=CtMj3Y1WLZH1Lm3eGXi5hqwmp4NA6iQBN83WMM1olW3wQ4WKB3dhM5sRIAzwn5/s+T pfcuNFolAX9VegypstR8xbEliebztwxdKXD5pxL/zpukgQkl+YvbbzH8ojMzZ8onqKOl dYhNMvPgad20KyVwwHNDoBgNxCW1aHmJqotkw= MIME-Version: 1.0 Received: by 10.68.0.69 with SMTP id 5mr2665493pbc.241.1308016734838; Mon, 13 Jun 2011 18:58:54 -0700 (PDT) Received: by 10.68.50.40 with HTTP; Mon, 13 Jun 2011 18:58:54 -0700 (PDT) In-Reply-To: References: Date: Mon, 13 Jun 2011 21:58:54 -0400 Message-ID: Subject: Re: tsvector limitations From: Tim To: Mark Johnson Cc: pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=bcaec5215c89d720bd04a5a260d0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.897 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201106/66 X-Sequence-Number: 37692 --bcaec5215c89d720bd04a5a260d0 Content-Type: text/plain; charset=ISO-8859-1 Mark, That link is a mirror of this mailing list; it's not from 5 months ago. If you are in the year 2012 please respond with lottery numbers and the like. On Mon, Jun 13, 2011 at 9:43 PM, Mark Johnson < mark@remingtondatabasesolutions.com> wrote: > > > I found another post where you asked the same questions 5 months ago. Have > you tested in that time? > http://www.spinics.net/lists/pgsql-admin/msg19438.html > > > A text search vector is an array of distinct lexemes (less any stopwords) > and their positions. Taking your example we get ... > > select to_tsvector('the lord of the rings.txt') "answer"; > answer > ------------------- > 'lord':2, 'rings.txt':5 > > You can put the length() function around it to just get the number of > lexemes. This is the size in terms of number of distinct lexemes, not size > in terms of space utilization. > > select length(to_tsvector('the lord of the rings.txt')) "answer"; > answer > -------- > 2 > > You might find the tsvector data consumes 2x the space required by the > input text. It will depend on your configuration and your input data. Test > it and let us know what you find. > > -Mark > > -----Original Message----- > *From:* Tim [mailto:elatllat@gmail.com] > *Sent:* Monday, June 13, 2011 03:19 PM > *To:* pgsql-admin@postgresql.org > *Subject:* [ADMIN] tsvector limitations > > Dear list, > > How big of a file would one need to fill the 1MB limit of a tsvector? > Reading > http://www.postgresql.org/docs/9.0/static/textsearch-limitations.htmlseems to hint that filling a tsvector is improbable. > > Is there an easy way of query the bytes of a tsvector? > something like length(tsvector) but bytes(tsvector). > > If there no easy method to query the bytes of a tsvector > I realize the answer is highly dependent on the contents of the file, so > here are 2 random examples: > How many bytes of a tsvector would a 32MB ascii english unique word list > make? > How many bytes of a tsvector would something like "The Lord of the > Rings.txt" make? > > If this limitation is ever hit is there a common practice for using more > than one tsvector? > Using a separate "one to many" table seems like an obvious solution piece, > but I would not know how to detect or calculate how much text to give each > tsvector. > Assuming tsvectors can't be linked maybe they would need some overlap. > > > Thanks in advance. > > --bcaec5215c89d720bd04a5a260d0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mark,

That link is a mirror of this mailing list; it's not from = 5 months ago.
If you are in the year 2012 please respond with lottery nu= mbers and the like.



On Mon, Jun 1= 3, 2011 at 9:43 PM, Mark Johnson <mark@remingtondatabasesolutions.com&= gt; wrote:
=A0

I found another post where you asked t= he same questions 5 months ago.=A0 Have you tested in that time?=A0 http://www.spinics.net/lists/pgsql-admin/msg19438.html


A text search vector is an array of distinct lexemes (less an= y stopwords) and their positions.=A0 Taking your example we get ... =

select to_tsvector('the lord of the rings.txt')= "answer";
=A0=A0=A0=A0=A0 answer
-= ------------------
'lord':2, 'rings.= txt':5

You can put the length() function around it to just get= the number of lexemes.=A0 This is the size in terms of number of distinct = lexemes, not size in terms of space utilization.

select length(to_tsvector('the lord of the rings.tx= t')) "answer";
=A0=A0answer
---= -----
=A0=A0=A0 =A0=A0=A0 2

You might find the tsvector data consumes 2x the space required b= y the input text.=A0 It will depend on your configuration and your input da= ta.=A0 Test it and let us know what you find.

-Mark

-----Original Message-----
Fro= m: Tim [mailto:= elatllat@gmail.com]
Sent: Monday, June 13, 2011 03:19 PM
<= b>To: p= gsql-admin@postgresql.org
Subject: [ADMIN] tsvector limitations

Dear list,

How b= ig of a file would one need to fill the 1MB limit of a tsvector?
Reading= http://www.postgresql.org/docs/9.0/static/textsea= rch-limitations.html seems to hint that filling a tsvector is improbabl= e.

Is there an easy way of query the bytes of a tsvector?
something lik= e length(tsvector) but bytes(tsvector).

If there no easy method to q= uery the bytes of a tsvector
I realize the answer is highly dependent on= the contents of the file, so here are 2 random examples:
How many bytes of a tsvector would a 32MB ascii english unique word list ma= ke?
How many bytes of a tsvector would something like "The Lo= rd of the Rings.txt" make?

If this limitation is ever hi= t is there a common practice for using more than one tsvector?
Using a separate "one to many" table seems like an obvious soluti= on piece,
but I would not know how to detect or calculate how much text = to give each tsvector.
Assuming tsvectors can't be linked maybe they= would need some overlap.


Thanks in advance.

--bcaec5215c89d720bd04a5a260d0--