Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id E9FE164FDDF for ; Tue, 14 Oct 2008 21:21:10 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 74327-01 for ; Tue, 14 Oct 2008 21:21:07 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.183]) by postgresql.org (Postfix) with ESMTP id B62CB64FDED for ; Tue, 14 Oct 2008 21:21:07 -0300 (ADT) Received: by wa-out-1112.google.com with SMTP id j4so1382589wah.19 for ; Tue, 14 Oct 2008 17:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=rKmVI+lSpb9iMvdEFl15hH1t66mcMgHVJHSHE362dzw=; b=wFOFRVyYcpfvkLfBTqgBdgpUWijddcn1fA4LLFxe4Tvl2dgGRy4t7zUcPAkN6RcuRm Gvt3rz30sU7njm4gjobc1hxbnZsrp8BNZ9rzjd4G/NLECXL+1uX8KcR7MQxzqdvmilEH VT6LlDwDnwleHTXiKJqt8UJYWDearTl5XfHMM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=XI8mxPm2/7VnK7pRgAIJ1RMPXLBFrD6NvmjA3tBFojrcND7aAhJKP4a1kQfRXq9Dys lbGLxX3U4HrTwpM0JnSfiBJVppHyOY25347EEsppiJgkMAu9TiXJ/F4NW4MqeL77+Tz7 aqq0KDxIyQFCeA/c1ZeBdLu9ZSN3F/4TVYXoA= Received: by 10.115.73.20 with SMTP id a20mr161839wal.213.1224030066373; Tue, 14 Oct 2008 17:21:06 -0700 (PDT) Received: by 10.114.39.11 with HTTP; Tue, 14 Oct 2008 17:21:06 -0700 (PDT) Message-ID: Date: Tue, 14 Oct 2008 18:21:06 -0600 From: "Scott Marlowe" To: Chris Subject: Re: Drupal and PostgreSQL - performance issues? Cc: pgsql-general@postgresql.org In-Reply-To: <48F53626.3000404@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2434A118-CEFA-43A9-BA88-006EC1F80326@hoegh.org> <20081014114011.0ebe495a@dawn.webthatworks.it> <8c8854360810140647n58abc9bend377e0e234dd39a9@mail.gmail.com> <8c8854360810140828p3b81bba0xac006f5565519981@mail.gmail.com> <48F51EB4.3090908@gmail.com> <48F53626.3000404@gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200810/585 X-Sequence-Number: 138834 On Tue, Oct 14, 2008 at 6:15 PM, Chris wrote: > >> Are you saying you have to reconnect to change schemas? In Oracle and >> PostgreSQL both you can change the current schema (or schemas for >> postgresql) with a single inline command. > > No I meant you have to change the schema after connecting. > > Some hosts only give you one db & one user. Yeh it sucks but that's all they > give you. Yeah, if you could at least have multiple users with pgsql it would be ideal. connect via user1, inherit his search_path, connect via user2, inherit the default search path, etc... > Before anyone says "get a new host".. from the end user POV.. you don't know > and/or don't care about the technical details, you just want something "that > works" with what you have. It's not an ideal situation to be in but it > definitely does happen. Understood. We aren't all working on large corporate in house servers for our stuff that we can configure how we want. >>> Shared hosts don't give you a lot of resources, so apps build stuff like >>> that in to make it easier. >> >> Schemas cost virtually nothing. > > Neither does building a smart(er) app which lets you set a "prefix" for all > of your tables so they are grouped together. True. Given that MySQL treats the first of three identifiers in dot notation as a db, and pg treats them as a schema, it would be a better solution to have pg use schemas and mysql use dbs. Except for the hosting providers. > You'll get a tiny performance hit from doing the replacement of the prefix, > but it's not going to be significant compared to everything else. Yeah, it's likely lost in the noise. I'd be more worried about ugly queries.