[GENERAL] Database owner can't analyze/vacuum all of the database tables

2007-09-04 Thread Yonatan Ben-Nes
he database owner didn't get ownership over those tables too then there is a reason for that... Thanks a lot in advance, Yonatan Ben-Nes

[GENERAL] Will Index improve the speed?

2007-08-28 Thread Yonatan Ben-Nes
Hi all, I got a table with many columns of data which got an index on one of the fields (Tsearch2 Gist). I thought that maybe if I'll create a new table with 2 fields (primary key reference to the previous table & the index field from the previous table) and made the index on the index field, may

Re: [GENERAL] Tsearch2 can't be checked for equality?

2007-03-25 Thread Yonatan Ben-Nes
svector('english', 'bh da'); ?column? -- t (1 row) I think, it should works in 8.2 also. Oleg On Sun, 25 Mar 2007, Yonatan Ben-Nes wrote: > Hi all, > > I'm trying to compare between 2 tsvector fields and I'm encountering a > problem, for e

[GENERAL] Tsearch2 can't be checked for equality?

2007-03-25 Thread Yonatan Ben-Nes
Hi all, I'm trying to compare between 2 tsvector fields and I'm encountering a problem, for example: test.com=> SELECT 1 WHERE to_tsvector('default', 'bh da') = to_tsvector('default', 'bh da'); ?column? -- (0 rows) There is another way that I can check for equality of 2 tsvector fields

[GENERAL] invalid input syntax for integer: "NULL"

2007-02-20 Thread Yonatan Ben-Nes
;) it works if a value is being passed to the integer field but doesn't work if a NULL Is passed: SELECT testinsertion(5); testinsertion -- INSERT INTO test (bh) VALUES (5) (1 row) SELECT testinsertion(NULL); testinsertion --- (1 row) Thanks a lot in advance, Yonatan Ben-Nes

[GENERAL] PDOStatement:closeCursor

2006-12-17 Thread Yonatan Ben-Nes
Hi all, I know that it's also related to PHP but sadly no one knew anything there so I try here... :) At the PHP manual of PDOStatement::closeCursorit's written that "This method is useful for database drivers that do not support

[GENERAL] b-tree index performance

2006-12-15 Thread Yonatan Ben-Nes
Hi all, I was wondering does the b-tree index performance change when it's implemented on different data types fields? is it better to use one of them instead of the other for (=) comparisons? I'm especially interested between INT8 and TEXT data types. Thanks a lot in advance, Ben-Nes Yonatan

[GENERAL] Numeric or Integer for monetary values?

2006-12-11 Thread Yonatan Ben-Nes
Hi all, I need to decide which data type should I make for monetary values, shall I use Numeric data type to hold values like "9.52" or is it better to keep it as an integer with value in cents like "952"? I know that at the manual it's written about the Numeric data type that "It is especially

Re: [GENERAL] Tsearch2 & Hebrew

2006-09-05 Thread Yonatan Ben-Nes
Oleg Bartunov wrote: On Tue, 5 Sep 2006, Yonatan Ben-Nes wrote: No, I didn't thought that it will be useful if it won't be accompanied by an hebrew stemmer which will work with it... I'm wrong? ispell and stemmer are doing the same job, so you may u

Re: [GENERAL] Tsearch2 & Hebrew

2006-09-05 Thread Yonatan Ben-Nes
No, I didn't thought that it will be useful if it won't be accompanied by an hebrew stemmer which will work with it... I'm wrong? Oleg Bartunov wrote: On Tue, 5 Sep 2006, Yonatan Ben-Nes wrote: Hi all, Well my problem was that I didn't know if

Re: [GENERAL] Tsearch2 & Hebrew

2006-09-05 Thread Yonatan Ben-Nes
one, so sadly one of the best features of Tsearch2 isn't working for me. If I'm wrong please let me know :) Thanks a lot in advance,   Yonatan Ben-Nes Oleg Bartunov wrote: You need to provide more details. Oleg On Fri, 1 Sep 2006, Michelle Konzack wrote: Hello Jonatan,

[GENERAL] Tsearch2 & Hebrew

2006-08-30 Thread Yonatan Ben-Nes
, or maybe I'm wrong and I can work only with the dictionary? Any information will be helpful. Thanks a lot in advance! Yonatan Ben-Nes

[GENERAL] Trying to update a box data type column

2006-05-23 Thread Yonatan Ben-Nes
Hi all, I got the following table: CREATE TABLE treecategory ( nleft INT4 NOT NULL, nright INT4 NOT NULL, box BOX NOT NULL ); I can't figure out how I can update the box column using the values at the nleft & nright columns. For example if I try: UPDATE treecategory SET box = '('||"nleft"||

[GENERAL] PHP PDO functions

2005-11-16 Thread Yonatan Ben-Nes
action layers like PEAR::DB got their disadvantages, does PDO got disadvantages also compared for using specific pg_ functions? I'll refer this question to PHP mailing list also. Thanks in advance, Yonatan Ben-Nes ---(end of broadcast)---

Re: [GENERAL] SQL injection

2005-11-03 Thread Yonatan Ben-Nes
Hannes Dorbath wrote: On 03.11.2005 04:12, Alex Turner wrote: I would have to say that for security purposes - I would want magic quotes _on_ rather than off for the whole reasons of SQL Injection that we already talked about. magic_quotes is evil and does if anything only prevent the simpl

Re: [GENERAL] SQL injection

2005-11-01 Thread Yonatan Ben-Nes
Jim C. Nasby wrote: On Tue, Nov 01, 2005 at 08:27:21PM +0200, Yonatan Ben-Nes wrote: Won't that create a performance penalty to extremly dynamic sites cause the plan will be planned only once and the data may vary alot? Beside that I still won't have a solution to places where

Re: [GENERAL] SQL injection

2005-11-01 Thread Yonatan Ben-Nes
and plan every query. On Mon, Oct 31, 2005 at 07:54:58PM +0200, Yonatan Ben-Nes wrote: Hi all, I'm currently trying to build a defence against SQL INJECTION, after reading some material on it I arrived to few possible solutions and I would like to know if anyone can comment anything abou

[GENERAL] SQL injection

2005-10-31 Thread Yonatan Ben-Nes
l be received gladly. Thanks in advance! Yonatan Ben-Nes ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] How to inject knowledge into a Postgres database

2005-10-09 Thread Yonatan Ben-Nes
Oleg Bartunov wrote: You could increase statistics or try contrib/tsearch2 Oleg On Fri, 7 Oct 2005, [EMAIL PROTECTED] wrote: Hello, We have a table of people with a date-of-birth and a surname, both indexed. We have queries like this: select report from table where dateofbirth = '1966-

Re: [GENERAL] Slow query using LIMIT

2005-09-27 Thread Yonatan Ben-Nes
Poul Møller Hansen wrote: Doing the following query: explain analyze SELECT * FROM my.tablename WHERE node = '1234567890' AND date BETWEEN '2005-03-27' AND NOW() ORDER BY id DESC takes 1,3 sec. with this result: Sort (cost=52971.52..53033.26 rows=24693 width=93) (actual time=1141.002..1252.9

Re: [GENERAL] Index use in BETWEEN statement...

2005-09-27 Thread Yonatan Ben-Nes
Tom Lane wrote: "Cristian Prieto" <[EMAIL PROTECTED]> writes: mydb=# explain analyze select locid from geoip_block where '216.230.158.50'::inet between start_block and end_block; As you see it still using a sequential scan in the table and ignores the index, any other suggestion? That tw

Re: [GENERAL] How many insert + update should one transaction handle?

2005-09-27 Thread Yonatan Ben-Nes
Jim C. Nasby wrote: On Mon, Sep 26, 2005 at 08:41:03PM +0200, Yonatan Ben-Nes wrote: Anyway I saw the idea: BEGIN; CREATE new_table; SELECT INTO new_table * FROM temp_table; DROP TABLE table; ALTER TABLE new_table RENAME TO table; COMMIT; Where if I understood correctly "table" is

Re: [GENERAL] Slow search.. quite clueless

2005-09-26 Thread Yonatan Ben-Nes
Oleg Bartunov wrote: On Mon, 26 Sep 2005, Yonatan Ben-Nes wrote: Hi again everyone, Oleg I tried tsearch2 and happily it does work wonderfully for me returning results extremly fast and actually its working even better then I wanted with all of those neat features like: lexem, weight

Re: [GENERAL] How many insert + update should one transaction handle?

2005-09-26 Thread Yonatan Ben-Nes
Robert Treat wrote: On Fri, 2005-09-23 at 14:53, Dawid Kuroczko wrote: On 9/23/05, Yonatan Ben-Nes < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: Hi all, Every few days I need to DELETE all of the content of few tables and INSERT new data in them. The amount of new dat

Re: [GENERAL] Slow search.. quite clueless

2005-09-26 Thread Yonatan Ben-Nes
Oleg Bartunov wrote: contrib/tsearch2 ( http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/ ) might works for you. It might because performance depends on cardinality of your keywords. Oleg On Tue, 20 Sep 2005, Yonatan Ben-Nes wrote: Hi all, Im building a site where the users can

Re: [GENERAL] How many insert + update should one transaction handle?

2005-09-23 Thread Yonatan Ben-Nes
Bruno Wolff III wrote: On Fri, Sep 23, 2005 at 12:51:09 +0200, Yonatan Ben-Nes <[EMAIL PROTECTED]> wrote: Hi all, Every few days I need to DELETE all of the content of few tables and INSERT new data in them. The amount of new data is about 5 million rows and each row get about 3 q

Re: [GENERAL] Slow search.. quite clueless

2005-09-23 Thread Yonatan Ben-Nes
Gábor Farkas wrote: Yonatan Ben-Nes wrote: Dawid Kuroczko wrote: Hmm, JOIN on a Huge table with LIMIT. You may be suffering from the same problem I had: http://archives.postgresql.org/pgsql-performance/2005-07/msg00345.php Tom came up with a patch which worked marvellous in my case: http

Re: [GENERAL] Questions about Rollback - after insert, update,

2005-09-23 Thread Yonatan Ben-Nes
t it (at the TRUNCATE page) but it wasnt autorized, anyone know why? maybe im mistaken? maybe its a bug and it should work? Cheers, Yonatan Ben-Nes ---(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

[GENERAL] How many insert + update should one transaction handle?

2005-09-23 Thread Yonatan Ben-Nes
o the server whats the size of the transaction and its ok to handle such a process in one transaction? Thanks alot in advance, Yonatan Ben-Nes ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Slow search.. quite clueless

2005-09-22 Thread Yonatan Ben-Nes
Dawid Kuroczko wrote: On 9/20/05, *Yonatan Ben-Nes* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Hi all, Im building a site where the users can search for products with up to 4 diffrent keywords which all MUST match to each product which found as a r

Re: [GENERAL] Slow search.. quite clueless

2005-09-21 Thread Yonatan Ben-Nes
Olly Betts wrote: Yonatan Ben-Nes wrote: Actually I even started to look on other solutions and maybe you can say something about them also.. maybe they can help me: 1. Omega (From the Xapian project) - http://www.xapian.org/ You could certainly do this with Xapian and Omega. With only 5

Re: [GENERAL] Slow search.. quite clueless

2005-09-21 Thread Yonatan Ben-Nes
ex.cgi/todo). -philip Oleg On Tue, 20 Sep 2005, Yonatan Ben-Nes wrote: Hi all, Im building a site where the users can search for products with up to 4 diffrent keywords which all MUST match to each product which found as a result to the search. I got 2 tables (which are releva

[GENERAL] Slow search.. quite clueless

2005-09-20 Thread Yonatan Ben-Nes
e - http://swish-e.org/index.html To add on everything I want at the end to be able to ORDER BY the results like order the product by price, but im less concerned about that cause I saw that with cluster I can do it without any extra overhead. Thanks alot in advance, Yonatan Ben-Nes -