[GENERAL] OFFSET and LIMIT - performance

2007-06-28 Thread Jan Bilek
Hello, I'm using PGDB with JDBC. In my app i need to select only portion of all available rows. I know i can do it two ways: 1. I can use OFFSET and LIMIT SQL statements or 2. I can select all rows and then filter requested portion in Java. My question - Does the second way significantly affect p

[GENERAL] PostgreSql replication and load balancing ( is Slony-I a solution?)

2007-05-01 Thread Jan Bilek
Hello, We're building database system with replication. Slony-I seems to be a quite good solution for the replication, but beside the replication (master-to-multiple slaves), we need load balancing aswell - multiple users will access the database at the same time=multiple queries. Is Slony-I ca

Re: [GENERAL] PostgreSql replication and load balancing ( is Slony-I a solution?)

2007-05-01 Thread Jan Bilek
On 5/1/07, Jan Bilek <[EMAIL PROTECTED]> wrote: Is Slony-I capable of load balancing and how to set it up? We searched the web and some people mentioned that Slony-I could do load balancing, but haven't found how to make Slony-I to do it. Slony does not do load balancing. Pe

Re: [GENERAL] Password authentication failed

2007-05-03 Thread Jan Bilek
Connect to PostgreSql as Postgres user (default database user): psql yourdb -U Postgres then you will be asked for password selected during the installation. Hope this will help. JB - Original Message - From: Suresh Nimbalkar To: pgsql-general@postgresql.org Sent: Tuesday, M

[GENERAL] Any "guide to indexes" exists?

2007-05-07 Thread Jan Bilek
Hello, I would need more info about index types in postgre (btree, hash, gin and gist) - is there any guide that explains in detail when to use which index type? These index types have different performance with certain collumn types and data characteristics store in them. There's not much info

Re: [GENERAL] Any "guide to indexes" exists?

2007-05-07 Thread Jan Bilek
"sometimes"? Unless i know how to use the indexes, then they are useless for me - am i right? Note: We are using gin with tsearch2 vectors, but here we had no choice - tsearch2 works only with gin and gist. Regards, Jan Am Montag, 7. Mai 2007 16:09 schrieb Jan Bilek: I would need more in

[GENERAL] JDBC - setting PG variables in URL

2007-05-07 Thread Jan Bilek
Hi, Is it possible to set any of postgre variables in JDBC conection URL? Example: "jdbc:postgresql://localhost:/dbname?pgvar1=value2&pgvar2=value2" Is this or simular construction plausible? We tried it, but it didn't work. OR - question could be put this way: How to set internal postgre varia

[GENERAL] JDBC - Prepared statements and PostgreSql Time/Date operations

2007-05-18 Thread Jan Bilek
Hello, I've got following problem: I use this simple query: select * from mytable where creation_time > (CURRENT_TIMESTAMP - interval '7 days'); ---> it selects all rows from mytable, which were created before one week or sooner (creation_time is column in mytable). I would like to use this

Re: [GENERAL] JDBC - Prepared statements and PostgreSql Time/Date operations

2007-05-18 Thread Jan Bilek
Got it! "Jan Bilek" <[EMAIL PROTECTED]> writes: I would like to use this query in java PreparedStatement, where age of a = row would be one of its parameters: PreparedStatement could look like this: select * from mytable where creation_time > (CURRENT_TIMESTAMP - ?)