Re: [SQL] Slow update SQL

2006-03-01 Thread Mauricio Fernandez A.
 You can try this too:...WHERE EXTRACT(YEAR FROM dxdate::Date) > 2000 Mauricio Fernández A.Ingeniero de SistemasUniversidad Autónoma de Manizales (Colombia) -Mensaje original-De: [EMAIL PROTECTED][mailto:[EMAIL PROTECTED]]En nombre de Bungsuputra LinanEnviado el: lunes, 27 febrero, 2

Re: [SQL] Slow update SQL

2006-02-28 Thread Bungsuputra Linan
ginal Message - From: Ken Hill To: Postgres Help Sent: Tuesday, February 14, 2006 8:48 AM Subject: [SQL] Slow update SQL I'm experiencing a very slow query. The table contains 611,564 rows of data. I vaccumed the table: VACUUM ANALYZE ncccr10; SELECT count(*) FROM ncccr10; count

Re: [SQL] Slow update SQL

2006-02-28 Thread Ken Hill
suggestion is try to change the query to: ... WHERE dxdate >= '2001-01-01'; I hope this helps. Regards, bungsu - Original Message - From: Ken Hill To: Postgres Help Sent: Tuesday, February 14, 2006 8:48 AM Subject: [SQL] Slow update SQL I'm experiencing a very slow query.

Re: [SQL] Slow update SQL

2006-02-14 Thread Markus Schaber
Hi, Ken, Ken Hill wrote: > Removing the indexes, running the update SQL, and then adding back the > indexes worked much faster. Thank you for you help. It might be a good idea to run VACUUM FULL between updating and reindexing. If you want to CLUSTER on an index, it will be best to create this

Re: [SQL] Slow update SQL

2006-02-14 Thread Ken Hill
On Mon, 2006-02-13 at 22:17 -0700, Michael Fuhr wrote: [Please copy the mailing list on replies.] On Mon, Feb 13, 2006 at 06:48:06PM -0800, Ken Hill wrote: > On Mon, 2006-02-13 at 19:14 -0700, Michael Fuhr wrote: > > How many rows does the condition match? > > csalgorithm=# SELECT count(*) F

Re: [SQL] Slow update SQL

2006-02-13 Thread Michael Fuhr
[Please copy the mailing list on replies.] On Mon, Feb 13, 2006 at 06:48:06PM -0800, Ken Hill wrote: > On Mon, 2006-02-13 at 19:14 -0700, Michael Fuhr wrote: > > How many rows does the condition match? > > csalgorithm=# SELECT count(*) FROM ncccr10 WHERE > date_part('year',dxdate) > '2000'; > cou

Re: [SQL] Slow update SQL

2006-02-13 Thread Michael Fuhr
On Mon, Feb 13, 2006 at 05:48:45PM -0800, Ken Hill wrote: > When I try to analyze the query plan with: > > EXPLAIN ANALYZE > UPDATE ncccr10 > SET key = facilityno||'-'|| > lastname||'-'|| > sex||'-'|| > ssno||'-'|| > birthdate||'-'|| > primarysit||'-'|| > dxdate

[SQL] Slow update SQL

2006-02-13 Thread Ken Hill
I'm experiencing a very slow query. The table contains 611,564 rows of data. I vaccumed the table: VACUUM ANALYZE ncccr10; SELECT count(*) FROM ncccr10; count 611564 (1 row) When I try to analyze the query plan with: EXPLAIN ANALYZE UPDATE ncccr10 SET key = facilityno||'-'|| las