Grokbase
x

Oleg Bartunov (o...@sai.msu.su)

Profile | Posts (716)Page 1 of 36: 1 2 3 > >>
1) Oleg Bartunov Re: [GENERAL] longest prefix match
| +1 vote
you can maintain an additional index for terms backwards. Regards, Oleg...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Wed, 20 Feb 2008, Jorge Godoy wrote:

> Em Wednesday 20 February 2008 05:55:07 Dragan Zubac escreveu:
>>
>> Anybody got any ideas/experiences/links for 'longest prefix match'
>> solution in PostgreSQL ?
>> Basically,put some telephone prefices in some kind of trie,and be able
>> to perform fast lookups ?
>
> Prefix or suffix?
>
> For prefix you can use "SELECT number FROM table WHERE number LIKE '123%'".
>
> For suffix you change the "%" to the beginning of the string, but then loose
> the ability to use indices. (Unfortunately, using suffixes is really
> interesting for caller IDs since you don't always receive area code, country
> code, etc.)

you can maintain an additional index for terms backwards.


>
>

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
2) Oleg Bartunov Re: [GENERAL] DB design: How to store object properties?
| +1 vote
Max, we use contrib/hstore specially designed for such kind of problem. It's a sort of perl's hash,...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Max,

we use contrib/hstore specially designed for such kind of problem. It's a
sort of perl's hash, where you can store all specific properties.
In that way, your table will looks like

create table objects ( id integer, x real, y real, ....,  props hstore)

Here '...' designates other mandatory fields you want to be searched.

Oleg
On Sun, 17 Feb 2008, Maxim Khitrov wrote:

> Greetings everyone,
>
> I'm fairly new to PostgreSQL, but I'm currently doing some research on
> tools to be used for an upcoming project and could really use your
> help with a possible database design.
>
> So the scenario is this. We have two projects starting that will deal
> heavily with mapping spatial regions. One of the reasons I'm looking
> at PostgreSQL is the PostGIS extension that may help us in dealing
> with all the geometry. The first project will be mapping the outside
> environment. Think along the lines of Google Maps, but intended for
> use by pedestrians rather than cars. The other project, one that I'll
> be managing, will be doing the same thing but with interiors of
> buildings. For now, the two projects will be separate, but eventually
> the plan is to merge them and actually allow the system to plan paths
> that incorporate outside and interior maps.
>
> That's the project description in a nutshell. What I'm doing now is
> trying to figure out the best way to store all the spatial
> information. I want to have a foundational layer that is as simple as
> possible, and that can later be extended for any special needs.
>
> The current plan is to do all the mapping via a graph structure using
> nodes/vertices and edges. A node will be defined simply in terms of a
> GUID (UUID in PostgreSQL). Each node will have a unique id, but no
> other "mandatory" information. An edge is defined by the ids of its
> two end points. This setup will be common to both projects, and the
> use of UUIDs will ensure that any database merges in the future will
> not result in conflicts.
>
> Now here's the tricky bit. We have to be able to associate an
> arbitrary number of properties with each node and edge. So an example
> of a node property would be that node's position defined by a
> latitude/longitude pair. We will define all the possible properties
> between our two projects, but just because a property is valid,
> doesn't mean that it will be present in or be relevant to every node
> in the system. For instance, nodes located inside of a building will
> likely have their position defined by something other than latitude
> and longitude, since capturing that data with a GPS will not be
> possible.
>
> The simplest design would be to create two tables, one for nodes
> another for edges, and create a column for every possible property.
> This, however, is huge waste of space, since there will not be a
> single node or edge that will make use of all the defined properties.
> There may be hundreds of properties, but each node may use ten on
> average. That's the question - how do you represent this information
> in the database in a space-efficient manner. We still have to be able
> to search for specific nodes given their properties. For example ÿÿ
> find all the nodes located within radius z of coordinate x,y. PostGIS
> will handle the special bit, but there has to be an efficient way of
> accessing this information/property for each node that has it.
>
> One other possibility I thought of was defining a master node table
> that would contain just the node ids. Then for each property I would
> create a separate table with the id column referencing the master.
> Here we're still wasting space for the extra storage of UUIDs, and if
> I want to run a query that selects nodes with several different
> properties, it would require a long list of JOINs.
>
> I looked at table inheritance that PostgreSQL offers, but it turned
> out to be something different from what I was hoping for. What I need
> is some sort of data inheritance based on a common unique key, but I
> don't think that's possible. Same thing with partitioning. If there
> was a way to partition the columns (with data) of a single large
> table, then that would be an ideal solution. But in the absence of
> that feature, what design would you recommend?
>
> Thanks,
> Max
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to [email protected: majo...@postgresql.org] so that your
> message can get through to the mailing list cleanly
>

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
3) Oleg Bartunov Re: [GENERAL] a newbie question on table design
| +1 vote
If you can select stable structure (common columns) and additional columns than you can : 1. Use...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
If you can select stable structure (common columns) and additional columns
than you can :

1. Use base class (table) with common columns + inherited tables with their
    own additional columns
2. We use contrib/hstore as a storage for semistructured data - we store
    additional columns as a key->value pairs in hstore data type. This is
    very flexible design.

On Fri, 15 Feb 2008, Leif B. Kristensen wrote:

> On Friday 15. February 2008, [email protected: fdu.x...@gmail.com] wrote:
>> Hi all,
>>
>> I have a large sdf file with many records of molecules and associated
>> data items and I want to save them in a PostgreSQL database. There are
>> about less than 40 data items for every molecule(the names of the data
>> items fore each molecule are the same, but values differ). The number
>> of molecules may exceed 20 million.
>>
>> Now I have come up with two ways to construct the table:
>>
>> 1) a table with about 40 columns, every data item has its
>> corresponding column, and one molecule corresponds to one row in the
>> table.
>>
>> This is direct and simple. The drawbacks is if I want to add more data
>> types to the database, I have to modify the structure of the table.
>>
>> 2) a table with just 3 columns:
>>
>>    CREATE TABLE mytable(
>>    id              serial,
>>    data_name       text,
>>    data_value      text
>>    );
>>
>> Then a single molecule will corresonds to about 40 rows in the
>> database.
>
> This is a sound concept, but I'd rather store the data_name in a
> separate table with an integer key, and replace data_name in mytable
> with a data_name_fk REFERENCES data_names (data_name_id). That's just
> Occam's Razor applied to database design, aka first normal form.
>
> You'd probably store the name of the molecule in a third table. Then you
> have a model very similar to the classic 'book database' where a book
> can have multiple authors, and an author can have multiple books. There
> are examples for this design all over the place.
>
>> If I need to add more data types to the table, I just need to add new
>> rows with new "data_name" column values. The drawback of this table is
>> it has too many rows(40 times of the former one) and waste a lot
>> space.
>>
>> Which one is better, or there are some other smart ways ?
>>
>> I have another question. Since the data I need to save is huge, is it
>> appropriate that I save the data value in compressed format ?
>
> That sounds a lot like premature optimization. Postgres is actually
> quite good at compacting data natively.
>

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq
4) Oleg Bartunov Re: [GENERAL] Working with huge amount of data. RESULTS!
| +1 vote
suffix tree (array) would speedup '%keyword%' query, but currently it doesn't supported by GiST...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Tue, 12 Feb 2008, Mario Lopez wrote:

> Hi!,
>
> I optimized the LIKE 'keyword%' and LIKE '%keyword' with the following
> results:
>
> # time /Library/PostgreSQL8/bin/psql -U postgres -d testdb -c "select * from
> table1 where varchar_reverse(data) like varchar_reverse('%keyword');"
> real    0m0.055s
> user    0m0.011s
> sys     0m0.006s
>
>
> # time /Library/PostgreSQL8/bin/psql -U postgres -d testdb -c "select * from
> table1 where data like 'keyword%';"
> real    0m0.026s
> user    0m0.012s
> sys     0m0.006s
>
> It works flawlesly as you can see by the timings, take in consideration that
> "table1" has 100 million records. The only problem is generating the reversed
> index which takes like 20 minutes, I guess it has to do with the plperl
> function, perhaps a C function for inverting would make it up in less time.
>
> The problem is still with the LIKE '%keyword%', my problem is that I am not
> searching for Words in a dictionary fashion, suppose my "data" is random
> garbage, that it has common consecutive bytes. How could I generate a
> dictionary from this random garbage to make it easier for indexing?

suffix tree (array) would speedup '%keyword%' query, but currently it doesn't
supported by GiST extension architecture (we have it in our TODO), so I see
several ways (not tested):

1. try contrib/pg_trgm to reduce a number of candidate words
2. generate all possible substrings and use your tested approach


>
>> On Mon, Feb 11, 2008 at 04:37:24PM +0100, Mario Lopez wrote:
>>
>>> SELECT * FROM names WHERE name LIKE keyword%
>>> Or
>>> SELECT * FROM names WHERE name LIKE %keyword%
>>>
>>
>> check this:
>> http://www.depesz.com/index.php/2007/07/30/indexable-field-like-something/
>> and this:
>> http://www.depesz.com/index.php/2007/09/15/speeding-up-like-xxx/
>>
>> depesz
>>
>>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
>      match
>

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
5) Oleg Bartunov Re: [GENERAL] [pgsql-advocacy] PostgreSQL Certification
| +1 vote
Can you show us the goals of the PostgreSQL Certification ? I always voted for the united...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Can you show us the goals of the PostgreSQL Certification ?
I always voted for the united PostgreSQL Certification program
(amin, developer) we could promote with the help of commercial companies.
In my opinion, common certificate, valid in all countries will be much more
useful than buttons. We have several good authors who can be sponsored to
write certification courses with the help of developers.

Oleg
On Wed, 30 Jan 2008, Joshua D. Drake wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hey guys,
>
> Myself and a small team of PostgreSQL contributors have started a new
> community project for PostgreSQL Certification. It is just launching
> but we wanted to get it out there so that people can join in on the
> discussion now :).
>
> For more information please visit:
>
> http://www.postgresqlcertification.org/
>
> Joshua D. Drake
>
> - --
> The PostgreSQL Company: Since 1997, http://www.commandprompt.com/
> PostgreSQL Community Conference: http://www.postgresqlconference.org/
> Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
> PostgreSQL SPI Liaison | SPI Director | PostgreSQL political pundit
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFHoPdMATb/zqfZUUQRAqhlAJ92rMzYpn+k4rGDXpd4WiZwJQcBNACfWNeg
> 0zPBFRb4yc6Idpj99PCcFbY=
> =Spdr
> -----END PGP SIGNATURE-----
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq
6) Oleg Bartunov Re: [GENERAL] tsearch2: stop words and stemming separate?
| +1 vote
Create custom dictionary using simple (or just add stop words to simple) and use it before english...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Sat, 26 Jan 2008, Sushant Sinha wrote:

> I want to remove stop words but do not want to stem the words. Is there
> an interface in tsearch2 that allows me to do this?
>
> Basically I am trying to implement spelling corrections and do not want
> to correct stop words.

Create custom dictionary using simple (or just add stop words to simple)
and use it before english stemmer, which has NO stop words !

=# insert into pg_ts_dict
               (SELECT 'remove_stopwords', dict_init,
                        'contrib/english.stop',
                        dict_lexize,
                        'simple dictionary with stop words'
                 FROM pg_ts_dict
                 WHERE dict_name = 'simple');

insert into pg_ts_dict
               (SELECT 'en_stem_no_stopwords', dict_init,
                        '',
                        dict_lexize,
                        'english stemmer without stop words'
                 FROM pg_ts_dict
                 WHERE dict_name = 'en_stem');


>
> Thanks,
> -Sushant.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [email protected: majo...@postgresql.org] so that your
message can get through to the mailing list cleanly
7) Oleg Bartunov Re: [GENERAL] TSearch: CLUSTER using GIST, query using GIN?
| +1 vote
what do you want to speed up ? Search is very fast, see explain analyze. The problem usually in the...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Sat, 19 Jan 2008, Hannes Dorbath wrote:

> Does it make any sense to CLUSTER by a GIST index to move tuples with similar
> lexems physically closer together on disc, drop it and use GIN for the actual
> queries?
>
> My queries are bound by HDD seek speed currently, might the above help me or
> can it even be counterproductive?

what do you want to speed up ? Search is very fast, see explain analyze.
The problem usually in the access to documents found to calculate
rank, headlines. If GIN  returns N documents, then you need to read
all of them to calculate rank and here you get slowdown.

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [email protected: majo...@postgresql.org] so that your
message can get through to the mailing list cleanly
8) Oleg Bartunov Re: [GENERAL] Segmentation fault with 8.3 FTS ISpell
| +1 vote
It'd be nice to have text string which cause segfault and sql script for configuration. Oleg...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
It'd be nice to have text string which cause segfault
and sql script for configuration.

Oleg
On Tue, 15 Jan 2008, Hannes Dorbath wrote:

> Crash happens about 7 minutes after issuing the UPDATE statement with current
> CVS HEAD. The table has around 5 million rows. It's always reproducible.
>
> ISpell dict used:
> http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/dicts/ispell/ispell-german-compound.tar.gz
> (iconved to UTF-8)
>
> Welcome to psql 8.3RC1, the PostgreSQL interactive terminal.
>
> Type:  \copyright for distribution terms
>       \h for help with SQL commands
>       \? for help with psql commands
> \g or terminate with semicolon to execute query
>       \q to quit
>
> test=# \dFd+ german_ispell
> List of text search dictionaries
> Schema | Name | Template | Init options
> | Description
> --------+---------------+-------------------+---------------------------------------------------------------+-------------
> public | german_ispell | pg_catalog.ispell | dictfile = 'german', afffile =
> 'german', stopwords = 'german' |
> (1 row)
>
> test=# \dF+ german_ispell
> Text search configuration "pg_catalog.german_ispell"
> Parser: "pg_catalog.default"
>      Token      |       Dictionaries
> -----------------+---------------------------
> asciihword      | german_ispell,german_stem
> asciiword       | german_ispell,german_stem
> email           | simple
> file            | simple
> float           | simple
> host            | simple
> hword           | german_ispell,german_stem
> hword_asciipart | german_ispell,german_stem
> hword_numpart   | simple
> hword_part      | german_ispell,german_stem
> int             | simple
> numhword        | simple
> numword         | simple
> sfloat          | simple
> uint            | simple
> url             | simple
> url_path        | simple
> version         | simple
> word            | german_ispell,german_stem
>
>
> test=# SELECT ts_debug('autofahren');
> ts_debug
> -----------------------------------------------------------------------------------------------------------------
> (asciiword,"Word, all
> ASCII",autofahren,"{german_ispell,german_stem}",german_ispell,"{autofahren,auto,fahren}")
> (1 row)
>
> test=# \d+ test
> Table "public.test"
> Column | Type | Modifiers | Description
> --------+----------+---------------------------------------------------+-------------
> id | integer | not null default nextval('test_id_seq'::regclass) |
> text | text | not null |
> tsv | tsvector | |
> Indexes:
>    "test_pkey" PRIMARY KEY, btree (id)
> Has OIDs: no
>
> test=# UPDATE test SET tsv = to_tsvector(text);
> server closed the connection unexpectedly
> This probably means the server terminated abnormally
>        before or while processing the request.
> The connection to the server was lost. Attempting reset: WARNING: terminating
> connection because of crash of another server process
> DETAIL: The postmaster has commanded this server process to roll back the
> current transaction and exit, because another server process exited
> abnormally and possibly corrupted shared memory.
> HINT: In a moment you should be able to reconnect to the database and repeat
> your command.
> Failed.
> !>
>
> Jan 15 11:32:50 brainchild postmaster[14815] general protection rip:5bb287
> rsp:7fff4ec80290 error:0
>
> Jan 15 11:32:50 brainchild postgres[14788]: [3-1] LOG: server process (PID
> 14815) was terminated by signal 11: Segmentation fault
> Jan 15 11:32:50 brainchild postgres[14788]: [4-1] LOG: terminating any other
> active server processes
> Jan 15 11:32:50 brainchild postgres[14843]: [3-1] WARNING: terminating
> connection because of crash of another server process
> Jan 15 11:32:50 brainchild postgres[14843]: [3-2] DETAIL: The postmaster has
> commanded this server process to roll back the current transaction and exit,
> because another server
> Jan 15 11:32:50 brainchild postgres[14843]: [3-3] process exited abnormally
> and possibly corrupted shared memory.
> Jan 15 11:32:50 brainchild postgres[14843]: [3-4] HINT: In a moment you
> should be able to reconnect to the database and repeat your command.
> Jan 15 11:32:50 brainchild postgres[14788]: [5-1] LOG: all server processes
> terminated; reinitializing
> Jan 15 11:32:50 brainchild postgres[14788]: [6-1] LOG: shmctl(1343488, 0, 0)
> failed: Invalid argument
> Jan 15 11:32:50 brainchild postgres[14844]: [7-1] LOG: database system was
> interrupted; last known up at 2008-01-15 11:32:33 CET
> Jan 15 11:32:50 brainchild postgres[14844]: [8-1] LOG: database system was
> not properly shut down; automatic recovery in progress
> Jan 15 11:32:50 brainchild postgres[14844]: [9-1] LOG: redo starts at
> 8/DC07E0A0
> Jan 15 11:32:54 brainchild postgres[14844]: [10-1] LOG: unexpected pageaddr
> 8/BD59C000 in log file 8, segment 236, offset 5881856
> Jan 15 11:32:54 brainchild postgres[14844]: [11-1] LOG: redo done at
> 8/EC59BEE0
> Jan 15 11:32:55 brainchild postgres[14847]: [7-1] LOG: autovacuum launcher
> started
> Jan 15 11:32:55 brainchild postgres[14788]: [7-1] LOG: database system is
> ready to accept connections
>
>
>

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [email protected: majo...@postgresql.org] so that your
message can get through to the mailing list cleanly
9) Oleg Bartunov Re: [GENERAL] tsearch2 headline options
| +1 vote
try 'HighlightAll=TRUE arxiv=# select headline('asd asd asd asd asd asd asd asd asd asd asd asd...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Wed, 2 Jan 2008, Jan Sunavec wrote:

> Hi all
>
> I have following problem when I use this
>
> select headline('asd asd asd asd asd asd asd asd asd asd asd asd more more
> more more more more more', to_tsquery('asd'), '');
>
> I got this
>
> "<b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b>
> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> more more more"
>
> So result is shorted than original text. I tryed set MinWords and MaxWords.
> But it doesn't help me. So question is how can I get original text?

try 'HighlightAll=TRUE

arxiv=# select headline('asd asd asd asd asd asd asd asd asd asd asd asd more more more more more more more', to_tsquery('asd'), 'HighlightAll=TRUE');
headline
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> <b>asd</b> more more more more more more more


>
> Best regards
>
>  John
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [email protected: majo...@postgresql.org] so that your
message can get through to the mailing list cleanly
10) Oleg Bartunov Re: [GENERAL] Prefix search, word completion, full text search
| +1 vote
there is no built-in. For your purpose I'd create separate table with words you want to be...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Sat, 29 Dec 2007, Vincent Bernat wrote:

> Hi !
>
> I am playing with the new full text search in PostgreSQL 8.3. I would
> like to search for prefixes to allow to complete words. For example, if
> I have the lexemes 'foo', 'foobar' and 'bar', I would like to get all
> the words whose prefix is 'foo', i.e 'foo' and 'foobar'.
>
> GIST or GIN (I don't remember) should allow to search for prefix. How
> can I query them?

there is no built-in. For your purpose I'd create separate table with
words you want to be completed (anywa, you dont complete garbage words)
and write simple dictionary which generates all prefixes beginning from
minlen (about 3) for input word and use it to create GIN index.
Should works. IIRC, someone already asked about such dictionary and even
posted such dictionary.

>
> Thanks.
>

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
11) Oleg Bartunov Re: [GENERAL] thesaurus support in postgresql
| +1 vote
C skill is not mandatory, you can help suggestion a ways how to improve thesaurus. Regards, Oleg...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Wed, 12 Dec 2007, Florian Aumeier wrote:

> Hi Oleg,
>
> thanks for your reply. Unfortunately I can't do C programming :-(

C skill is not mandatory, you can help suggestion a ways how to improve
thesaurus.

>
> Regards
> Florian
>
>

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
12) Oleg Bartunov Re: [GENERAL] thesaurus support in postgresql
| +1 vote
Florian, I'm one of the author of thesaurus. We're interested in improving of thesaurus, but have...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Florian,

I'm one of the author of thesaurus. We're interested in improving of
thesaurus, but have no spare time. You're welcome to improve
thesaurus dictionary.

Oleg
On Wed, 12 Dec 2007, Florian Aumeier wrote:

> just a follow up to my question regarding thesaurus support.
> Is there really no one here who knows anything about it?
>
> If there are plans for it?
> If there is someone currently working on it?
> Or if there is somebody else I could ask?
>
> Regards
> Florian
>
>

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
13) Oleg Bartunov Sun and open source, where is postgresql ?
| +1 vote
Hello, just read "Getting Paid to Develop"...
PostgreSQL - Advocacy
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Hello,

just read "Getting Paid to Develop"
http://blogs.sun.com/webmink/entry/getting_paid_to_develop
that Sun will pay open-source developers.
"This year's participants include OpenSolaris, GlassFish, OpenJDK,
OpenSPARC, NetBeans, and OpenOffice.org."

Where is PostgreSQL ?

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83
14) Oleg Bartunov Re: hibernate + postgresql ?
| +1 vote
Thank you, that's what I'm afraid for. Regards, Oleg...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Thu, 29 Nov 2007, Joshua D. Drake wrote:

> Oleg Bartunov wrote:
>> Hello,
>>
>> any exprerience with Hibernate + PostgreSQL ? How does this combination
>> is flexible and smart ? Is't possible to tune selected queries ?
>
> In short, it sucks :).
>
> Long description: Hibernate is a mature ORM for Java. It is in use with
> PostgreSQL in quite a few installations and even a bunch that we are
> responsible for. It does work as well as any ORM can work.
>
> The problem is, its an ORM and ORMs are dumb in there actual ability to work
> with any real relational database.
>
> If you are not lazy you can push outside the standard hibernate methods and
> produce very usable code but then you have to wonder why you have hibernate
> there at all.

Thank you, that's what I'm afraid for.
>
>
> Sincerely,
>
> Joshua D. Drake
>
>
>>
>>     Regards,
>>         Oleg
>> _____________________________________________________________
>> Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
>> Sternberg Astronomical Institute, Moscow University, Russia
>> Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
>> phone: +007(495)939-16-83, +007(495)939-23-83
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 5: don't forget to increase your free space map settings
>>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org/
>

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83
15) Oleg Bartunov hibernate + postgresql ?
| +1 vote
Hello, any exprerience with Hibernate + PostgreSQL ? How does this combination is flexible and...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Hello,

any exprerience with Hibernate + PostgreSQL ? How does this combination
is flexible and smart ? Is't possible to tune selected queries ?

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83
16) Oleg Bartunov Re: TB-sized databases
| +1 vote
We have several TB database in production and it works well on HP rx1620 dual Itanium2, MSA 20,...
PostgreSQL - Performance
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
We have several TB database in production and it works well on
HP rx1620 dual Itanium2, MSA 20, running Linux. It's read-only storage for
astronomical catalogs with about 4-billions objects. We have custom
index for spherical coordinates which provide great performance.

Oleg
On Mon, 26 Nov 2007, Peter Koczan wrote:

> Hi all,
>
> I have a user who is looking to store 500+ GB of data in a database
> (and when all the indexes and metadata are factored in, it's going to
> be more like 3-4 TB). He is wondering how well PostgreSQL scales with
> TB-sized databases and what can be done to help optimize them (mostly
> hardware and config parameters, maybe a little advocacy). I can't
> speak on that since I don't have any DBs approaching that size.
>
> The other part of this puzzle is that he's torn between MS SQL Server
> (running on Windows and unsupported by us) and PostgreSQL (running on
> Linux...which we would fully support). If any of you have ideas of how
> well PostgreSQL compares to SQL Server, especially in TB-sized
> databases, that would be much appreciated.
>
> We're running PG 8.2.5, by the way.
>
> Peter
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83
17) Oleg Bartunov Re: [GENERAL] EAV or not to EAV?
| +1 vote
We use contrib/hstore for this Regards, Oleg
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Thu, 22 Nov 2007, Reg Me Please wrote:

> Hi all.
>
> I have to take into account the update history of every single
> field into a number of tables.
> Those updates can come to the future (next values) but also to the
> past (history fix) and apply only to some fields, usually not to the
> entire record.
> Every lookup in those tables is always related to a timestamp that
> normally is the current timestamp, but can also be a past timestamp.
>
> I've come up with a "traditionally regretted" EAV design with the add of
> timestamps for the history. And the related problems, some of which have
> been solved by Joe Conways's crosstab contrib.
>
> Is there a better idea than mine? I hope so.

We use contrib/hstore for this


  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq
18) Oleg Bartunov Re: [pgsql-advocacy] PostgreSQL Conference 08 East!
| +1 vote
Are there any possibilities to sponsor me and Teodor ? Oleg Regards, Oleg...
PostgreSQL - AdvocacyPostgreSQL - General
[ Profile | Reply to groups ] [ Flat  Thread  Threaded ]
Are there any possibilities to sponsor me and Teodor ?

Oleg
On Mon, 19 Nov 2007, Joshua D. Drake wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> It's that time, after a wildly successful conference last October in
> Portland, Oregon we are now beginning to ramp up for the East Coast 08
> conference! The current plan is to host a two day conference of
> Tutorials (new) and Talks on March 28th and 29th. The currently
> designated location for the conference is the Univserity of Maryland.
> This will be confirmed within two weeks.
>
> For now, we are making a call out to the community, it was the hands of
> the community that made the October conference great. It will be the
> hands of the community that makes the March conference great!
>
> We have already had a couple of offers for help which we are grateful
> for but we want to make sure that we open this up for anyone who may
> want to help organize the conference. Of specific interest are
> community members that are geographically close to the Maryland area.
> We will need boots on the ground to help us follow up with others (such
> as student unions etc..) to make sure we kick this conference off
> without a hitch.
>
> As a reminder all proceeds from the Conference series go directly to
> PostgreSQL via Software in the Public Interest, a 501(c)3 non-profit,
> and will be used for PostgreSQL development, support and advocacy.
>
> So if you are on the east coast and can help with organizing this
> conference please let me know.
>
> Sincerely,
>
> Joshua D. Drake
>
> - --
>
> === The PostgreSQL Company: Command Prompt, Inc. ===
> Sales/Support: +1.503.667.4564 24x7/Emergency: +1.800.492.2240
> PostgreSQL solutions since 1997 http://www.commandprompt.com/
>    UNIQUE NOT NULL
> Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
> PostgreSQL Replication: http://www.commandprompt.com/products/
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFHQiXYATb/zqfZUUQRApK+AJ0WPG39t8CF2oOFF/uHhtgzo7zELgCghYy+
> FNjnokvLINAvh8DxJxmctAI=
> =gvjX
> -----END PGP SIGNATURE-----
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
19) Oleg Bartunov Re: [GENERAL] Improve Search
| +1 vote
create custom parser/dictionary would greatly help you. see dict_regex, for example,...
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Fri, 2 Nov 2007, carter ck wrote:

>
> Hm. No. I am not using tsearch2. I have looked at the documentation, but not sure how it benefits me.
>
> I am searching for text such as mobile numbers and user name in my application.
>
> Any idea of having tseach2 to accommodate different search fields? Way of Implementing it will be helpful too.

create custom parser/dictionary would greatly help you.
see dict_regex, for example,
http://lynx.sao.ru/~karpov/software/postgres_dict_regex.html


>
> Thanks.
>
> ----------------------------------------
>> Date: Thu, 1 Nov 2007 22:32:47 -0500
>> From: [email protected: scott.ma...@gmail.com]
>> To: [email protected: carte...@hotmail.com]
>> Subject: Re: [GENERAL] Improve Search
>> CC: [email protected: pgsql-ge...@postgresql.org]
>>
>> On 11/1/07, carter ck  wrote:
>>>
>>> Hi all,
>>>
>>> Has anyone come across a solution for faster and powerful search stored procedure in a table that contains more than 500K of records?
>>>
>>> I am currently trying to work around with it. All helps are appreciated.
>>
>> Are you using the tsearch2 full text engine? If not, you're missing
>> the boat for fast searching text. But you didn't really tell us what
>> exactly you're searching on, so I'm just guessing.
>
> _________________________________________________________________
> Manage multiple email accounts with Windows Live Mail!
> http://www.get.live.com/wl/all
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>

  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
20) Oleg Bartunov Re: [GENERAL] Fragments in tsearch2 headline
| +1 vote
That time we considered it as developers function useful only for debugging. Regards, Oleg
PostgreSQL - General
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Tue, 30 Oct 2007, Tom Lane wrote:

>> On 10/30/07, Oleg Bartunov <oleg@sai.msu.su> wrote:
>>> ... In tsearch2 we have get_covers() function,
>>> which produces all excerpts like:
>
> I had not realized till just now that the 8.3 core version of tsearch
> omitted any material feature of contrib/tsearch2. Why was get_covers()
> left out?

That time we considered it as developers function useful only for debugging.


  Regards,
   Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: [email protected: o...@sai.msu.su], http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq
spacer
Profile | Posts (716)Page 1 of 36: 1 2 3 > >>