[GENERAL] PG9.0 planner difference to 8.3 -> majorly bad performance

2011-01-29 Thread Uwe Schroeder
Maybe someone here can make sense of this. I'm trying to upgrade a 8.3 system to a 9.0 system. Usual procedure dump, restore, vac full, reindex. Both - old and new - run on the same hardware and the postgresql.conf settings are identical. You'll probably ask for the table definitions, which I

Re: [GENERAL] PG9.0 planner difference to 8.3 -> majorly bad performance

2011-01-29 Thread Stephen Frost
* Uwe Schroeder (u...@oss4u.com) wrote: > Now I turn off the 8.3 instance and start the 9.0 instance. Remember, > everything is identical. Here the same query again: Everything isn't identical if you just started PG 9.0 though- presumably the 8.3 instance had everything cache'd already. What hap

Re: [GENERAL] Adding more space, and a vacuum question.

2011-01-29 Thread Craig Ringer
On 01/29/2011 05:12 AM, Herouth Maoz wrote: The machine has no additional room for internal disks. It is a recent purchase and not likely to be replaced any time soon. Newly acquired or not, it sounds like it isn't sized correctly for the load and needs an upgrade if it can't be shifted into

Re: [GENERAL] PG9.0 planner difference to 8.3 -> majorly bad performance

2011-01-29 Thread Thom Brown
On 29 January 2011 09:11, Uwe Schroeder wrote: > > Maybe someone here can make sense of this. > I'm trying to upgrade a 8.3 system to a 9.0 system. Usual procedure dump, > restore, vac full, reindex. > > Both - old and new - run on the same hardware and the postgresql.conf > settings are identic

Re: [GENERAL] Full Text Index Scanning

2011-01-29 Thread Matt Warner
Thanks Oleg. I'm going to have to experiment with this so that I understand it better. Matt On Fri, Jan 28, 2011 at 1:12 PM, Oleg Bartunov wrote: > Matt, I'd try to use prefix search on original string concatenated with > reverse string: > > Just tried on some spare table > > knn=# \d spot_toul

Re: [GENERAL] Adding more space, and a vacuum question.

2011-01-29 Thread Herouth Maoz
בתאריך 29/01/11 13:57, ציטוט Craig Ringer: On 01/29/2011 05:12 AM, Herouth Maoz wrote: The machine has no additional room for internal disks. It is a recent purchase and not likely to be replaced any time soon. Newly acquired or not, it sounds like it isn't sized correctly for the load and n

Re: [GENERAL] Full Text Index Scanning

2011-01-29 Thread Matt Warner
Reverse isn't a built-in Postgres function, so I found one and installed it. However, attempting to use it in creating an index gets me the message "ERROR: functions in index expression must be marked IMMUTABLE", even though the function declaration already has the immutable argument. Is there a

[GENERAL] pymssql: Problem with Unicode string

2011-01-29 Thread orgilhp
Hello! I am using pymssql-1.9.908. And I have MSSQL2008 database server. I ran following code from python 2.6: --- import pymssql conn = pymssql.connect(host='testserver', user='sa', password='sa', database='testdb', as_dict=True) crms = conn.

[GENERAL] pymssql Connection to the database failed for an unknown reason

2011-01-29 Thread orgilhp
Hello I am using pymssql to connect to MSSQL2008 database. But an error occurs: -- >>> import pymssql >>> conn = pymssql.connect(host='orgilhpnb\mssql2008', user='erp', >>> password='123', database='eoffice_clone') Traceback (most rec

Re: [GENERAL] pymssql: Problem with Unicode string

2011-01-29 Thread Thom Brown
On 29 January 2011 14:52, orgilhp wrote: > Hello! > I am using pymssql-1.9.908. And I have MSSQL2008 database server. > I ran following code from python 2.6: > --- >        import pymssql >        conn = pymssql.connect(host='testserver', user='sa', > password='sa',

Re: [GENERAL] pymssql: Problem with Unicode string

2011-01-29 Thread Raymond O'Donnell
On 29/01/2011 14:52, orgilhp wrote: Here is my question: How to get Unicode data from MSSQL database using pymssql library? I think you'd have a better chance of getting an answer from a list on MSSQL; this one is devoted to PostgreSQL. That said, they're a helpful bunch around here, so you

Re: [GENERAL] pymssql Connection to the database failed for an unknown reason

2011-01-29 Thread Thom Brown
On 29 January 2011 13:08, orgilhp wrote: > Hello > I am using pymssql to connect to MSSQL2008 database. But an error > occurs: > -- import pymssql conn = pymssql.connect(host='orgilhpnb\mssql2008', user='erp', password

Re: [GENERAL] Full Text Index Scanning

2011-01-29 Thread Oleg Bartunov
What version of Pg you run ? Try latest version. Oleg On Sat, 29 Jan 2011, Matt Warner wrote: Reverse isn't a built-in Postgres function, so I found one and installed it. However, attempting to use it in creating an index gets me the message "ERROR: functions in index expression must be marke

Re: [GENERAL] PG9.0 planner difference to 8.3 -> majorly bad performance

2011-01-29 Thread Uwe Schroeder
> On 29 January 2011 09:11, Uwe Schroeder wrote: > > Maybe someone here can make sense of this. > > I'm trying to upgrade a 8.3 system to a 9.0 system. Usual procedure dump, > > restore, vac full, reindex. > > > > Both - old and new - run on the same hardware and the postgresql.conf > > setting

Re: [GENERAL] PG9.0 planner difference to 8.3 -> majorly bad performance

2011-01-29 Thread Uwe Schroeder
> * Uwe Schroeder (u...@oss4u.com) wrote: > > Now I turn off the 8.3 instance and start the 9.0 instance. Remember, everything is identical. Here the same query again: > Everything isn't identical if you just started PG 9.0 though- presumably > the 8.3 instance had everything cache'd already. W

Re: [GENERAL] PG9.0 planner difference to 8.3 -> majorly bad performance

2011-01-29 Thread Stephen Frost
* Uwe Schroeder (u...@oss4u.com) wrote: > Yes, the database is vacuumed and analyzed. The bad plan from 9.0 improves by > 2 seconds when I go for a really high statistics target of 5000. What if you go back to 10..? Stephen signature.asc Description: Digital signature

Re: [GENERAL] Full Text Index Scanning

2011-01-29 Thread Matt Warner
9.0.2 On Sat, Jan 29, 2011 at 9:35 AM, Oleg Bartunov wrote: > What version of Pg you run ? Try latest version. > > Oleg > > > On Sat, 29 Jan 2011, Matt Warner wrote: > > Reverse isn't a built-in Postgres function, so I found one and installed >> it. >> However, attempting to use it in creating

Re: [GENERAL] PG9.0 planner difference to 8.3 -> majorly bad performance

2011-01-29 Thread Uwe Schroeder
> The duration suddenly goes from 270 milliseconds to 173 seconds! The index > scan on bprofile_comments_status_idx suddenly shows 15288 loops, where it > should be 1 loop just like before. So shomehow the 9.0 planner gets it all > wrong. > > I also noticed that normally I get an iowait with a