Re: [PERFORM] Databases Vs. Schemas

2004-03-26 Thread CoL
hi Josh Berkus wrote: Stalin, We are evaluating the options for having multiple databases vs. schemas on a single database cluster for a custom grown app that we developed. Each app installs same set of tables for each service. And the service could easily be in thousands. so Is it better to ha

Re: [PERFORM] Looking for ideas on how to speed up warehouse loading

2004-04-26 Thread CoL
hi, Sean Shanny wrote, On 4/22/2004 23:56: SELECT t1.id, t2.url FROM referral_temp t2 LEFT OUTER JOIN d_referral t1 ON t2.url = t1.referral_raw_url ORDER BY t1.id index on url (text) has no sense. Try to use and md5 (char(32) column) which contains the md5 hash of url field. and join these ones.

Re: [PERFORM] Mysterious performance of query because of plsql function in

2004-07-07 Thread CoL
hi, Peter Alberer wrote: Hi there, i have a problem with a query that uses the result of a plsql function In the where clause: SELECT assignments.assignment_id, assignments.package_id AS package_id, assignments.title AS title, COUNT(*) AS Count FROM assignments INNER JOIN submissions

Re: [PERFORM] The black art of postgresql.conf tweaking

2004-08-10 Thread CoL
hi, Paul Serby wrote: Can anyone give a good reference site/book for getting the most out of your postgres server. All I can find is contradicting theories on how to work out your settings. This is what I followed to setup our db server that serves our web applications. http://www.phpbuilder.co

Re: [PERFORM] Which plattform do you recommend I run PostgreSQL for best

2004-10-19 Thread CoL
hi, [EMAIL PROTECTED] wrote: Hello I am doing a comparison between MySQL and PostgreSQL. In the MySQL manual it says that MySQL performs best with Linux 2.4 with ReiserFS on x86. Can anyone official, or in the know, give similar information regarding PostgreSQL? Also, any links to benchmarking test

Re: [PERFORM] Select max(foo) and select count(*) optimization

2004-01-08 Thread CoL
Hi, Shridhar Daithankar wrote: select relpages,reltuples from pg_class where relname=; Assuming the stats are recent enough, it would be much faster and accurate.. this needs an analyze ; before select from pg_class, cause only after analyze will update pg the pg_class C.

Re: [PERFORM] COUNT & Pagination

2004-01-16 Thread CoL
Hi, David Shadovitz wrote, On 1/11/2004 7:10 PM: I understand that COUNT queries are expensive. So I'm looking for advice on displaying paginated query results. I display my query results like this: Displaying 1 to 50 of 2905. 1-50 | 51-100 | 101-150 | etc. I do this by executing two quer

[PERFORM] subquery and table join, index not use for table

2004-01-16 Thread CoL
Hi, I have to following select: set enable_seqscan = on; set enable_indexscan =on; select a.levelno,a.id from (select 1 as levelno,42 as id) a, menutable b where b.site_id='21' and a.id=b.id; menutable: id bigint, site_id bigint Indexes: menutable_pkey primary key btree (site_id, id), The expl

Re: [PERFORM] Feature request: smarter use of conditional indexes

2004-03-09 Thread CoL
hi, John Siracusa wrote, On 3/3/2004 20:56: Given an index like this: CREATE UNIQUE INDEX i1 ON t1 (c1) WHERE c1 IS NOT NULL; and a query like this: SELECT * FROM t1 WHERE c1 = 123; I'd like the planner to be smart enough to use an index scan using i1. Yes, I can change the query to