[GENERAL] Updating a production database schema from dev server

2007-10-16 Thread Stanislav Raskin
Hello everybody, I am currently running two PostgreSQL servers on two different machines. One of them I use for development and the other one as the "real" production server for my applications. While developing new versions of these applications, I of course have to modify the database schem

Re: [GENERAL] Updating a production database schema from dev server

2007-10-16 Thread Stanislav Raskin
endet: Dienstag, 16. Oktober 2007 19:51 An: Stanislav Raskin Cc: pgsql-general@postgresql.org Betreff: Re: [GENERAL] Updating a production database schema from dev server On 10/16/07, Stanislav Raskin <[EMAIL PROTECTED]> wrote: > > Hello everybody, > > I am currently running tw

Re: [GENERAL] "Concatenate" two queries - how?

2007-10-24 Thread Stanislav Raskin
I don't know whether I did understand you entirely, but you might want to take a look at the UNION clause: http://www.postgresql.org/docs/8.2/interactive/sql-select.html#SQL-UNION -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Stefan Schwarzer

[GENERAL] Understanding Aliases

2007-12-11 Thread Stanislav Raskin
OR: column "account_id" does not exist What exactly goes wrong here? I simply do not understand, why the first, more complex query works with the alias, but the second one does not. Did I misunderstand the meaning and usage of such aliases as got_t2_id? Thank you very much in advance. Stanislav Raskin

Re: [GENERAL] Understanding Aliases

2007-12-11 Thread Stanislav Raskin
I messed up a little while reformatting, the error message is of course: ERROR: column "got_t2_id" does not exist _ Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Stanislav Raskin Gesendet: Dienstag, 11. Dezember 2007 12:33 An: pgsql-general@post

Re: [GENERAL] Understanding Aliases

2007-12-11 Thread Stanislav Raskin
Note to self: works if I directly reference outer query column name from the inner query. Still no Idea why it does not work with the alias.

Re: [GENERAL] Understanding Aliases

2007-12-11 Thread Stanislav Raskin
t2.active AND ( (SELECT COUNT(id) FROM t4 WHERE t2_id = t2.id AND value=10) <= 3 ) Will the subquery be evaluated twice, or is postgres smart enough to somehow cache the result from the first call of the subquery? Kind Regards Stanislav Raskin -

Re: [GENERAL] Understanding Aliases

2007-12-11 Thread Stanislav Raskin
> should do the trick without double select, or? Indeed it seems to do so. The cost estimation is even about 10 times less with the real application's queries. I never really used group/having even though being aware of their existence. I probably should do so more often.

Re: [GENERAL] Understanding Aliases

2007-12-11 Thread Stanislav Raskin
] Gesendet: Dienstag, 11. Dezember 2007 19:54 An: Stanislav Raskin Cc: pgsql-general@postgresql.org Betreff: Re: [GENERAL] Understanding Aliases > SELECT-list output aliases name the *output* columns of the SELECT. > Those output columns are not available to the SELECT's computatio

[GENERAL] SELECT DISTINCT ON and ORDER BY

2008-03-28 Thread Stanislav Raskin
Hello everybody, I have a table like this one: id value order_field 1 103 2 124 3 101 4 5 8 5 122 What I want to do, is to do something like SLECT DISTINCT ON (my_table.value) my_

Re: [GENERAL] SELECT DISTINCT ON and ORDER BY

2008-03-28 Thread Stanislav Raskin
An: Stanislav Raskin Cc: pgsql-general@postgresql.org Betreff: Re: [GENERAL] SELECT DISTINCT ON and ORDER BY maybe this? select value, max(id) as id, max(order_field) as order_field from mytable group by value order by 3 2008/3/28, Stanislav Raskin <[EMAIL PROTECTED]>: Hello eve

[GENERAL] full text search to_tsquery performance with ispell dictionary

2011-05-11 Thread Stanislav Raskin
thing wrong? I'd be thankful for any advice. Kind Regards -- Stanislav Raskin livn GmbH Campus Freudenberg Rainer-Gruenter-Str. 21 42119 Wuppertal +49(0)202-8 50 66 921 ras...@livn.de http://www.livn.de livn local individual video news GmbH Registergericht Wuppertal HRB 20086 Geschäft

Re: [GENERAL] full text search to_tsquery performance with ispell dictionary

2011-05-11 Thread Stanislav Raskin
is strictly PHP, so I was thinking about using a single persistent connection (http://de.php.net/manual/en/function.pg-pconnect.php) for all calls. Is there some sort of major disadvantage in this approach from the database point of view? Kind regards -- Stanislav Raskin -- Sent via pgsql-gener

Re: [GENERAL] full text search to_tsquery performance with ispell dictionary

2011-05-11 Thread Stanislav Raskin
multi-master replication, load balancing and high availability. To introduce connection pooling to this setup could turn out to be quite a big project. -- Stanislav Raskin -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://ww

Re: [GENERAL] full text search to_tsquery performance with ispell dictionary

2011-05-11 Thread Stanislav Raskin
temmer to create tsqueries? Thus, I hope to create a fast user experience while searching, but at the same time have more detailed tsvectors and more matches. Regards -- Stanislav Raskin > -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] full text search to_tsquery performance with ispell dictionary

2011-05-12 Thread Stanislav Raskin
On 11.05.11 17:04, "t...@fuzzy.cz" wrote: >We had exactly the same problem and persistent connection solved it. First testing with persistent connections seems to work like a charm. Will do some thorough testing and watch the memory load. Hopefully, I will not trip over some sort of pitfall. Go

Re: [GENERAL] full text search to_tsquery performance with ispell dictionary

2011-05-12 Thread Stanislav Raskin
On 11.05.11 17:31, "Tom Lane" wrote: >You really, really, really need to fix whatever is preventing you from >using pooling. Opening a database connection to run one query is just >horridly inefficient. Very true. I did not mean that anything actually prevents us from using pooling. We just

[GENERAL] query with offset stops using index scan

2008-08-31 Thread Stanislav Raskin
Hello everybody, I have some weird behaviour with a pretty simple query, which I use in a web front end to browse through pages of data. SELECT foo.id, get_processing_status(foo.id) AS status, foo.name, foo.valid_until FROM foo WHERE foo.active AND foo.valid_un

Re: [GENERAL] query with offset stops using index scan

2008-08-31 Thread Stanislav Raskin
which is not the case, because serial ids are not necessarily continuous (i.e. if some data sets were deleted). -Ursprüngliche Nachricht- Von: Scott Marlowe [mailto:[EMAIL PROTECTED] Gesendet: Sonntag, 31. August 2008 17:26 An: Stanislav Raskin Cc: pgsql-general@postgresql.org Betreff: R