[GENERAL] Create db with template does not transfer ownership

2009-06-29 Thread Ben Harper
I'm trying to create a PostGIS database by using CREATE DATABASE mydb TEMPLATE template_postgis; using the Windows one-click installer package, with PostGIS 1.3 / Postgres 8.3.7. But my question is more general: When a new database is created base on a template, the owner of those tables is not

[GENERAL] SELECT DISTINCT very slow

2009-07-09 Thread Ben Harper
Hi, Can anybody explain this: Records: 600,000 Field Width: Approximately 20 UTF8 characters - type is VARCHAR(25) Field is Indexed. SELECT DISTINCT field FROM table; Takes about 6 seconds. There are 111 distinct items. On Sqlite, and another place where I have a B+Tree, this query is faster th

Re: [GENERAL] SELECT DISTINCT very slow

2009-07-10 Thread Ben Harper
operation in this domain. Again, thanks for all the feedback. I'll upgrade to 8.4 soon. Ben Harper On Fri, Jul 10, 2009 at 2:50 AM, Tom Lane wrote: > Greg Stark writes: >> Not really. The OP doesn't say how wide the record rows are but unless >> they're very wide