Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMdBF-0000wU-E8 for pgsql-general@arkaria.postgresql.org; Tue, 13 Nov 2018 18:12:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gMdBD-0000bR-Fe for pgsql-general@arkaria.postgresql.org; Tue, 13 Nov 2018 18:12:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMdBD-0000bH-54 for pgsql-general@lists.postgresql.org; Tue, 13 Nov 2018 18:12:51 +0000 Received: from mail-ot1-x335.google.com ([2607:f8b0:4864:20::335]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gMdB6-0003EF-U9 for pgsql-general@lists.postgresql.org; Tue, 13 Nov 2018 18:12:50 +0000 Received: by mail-ot1-x335.google.com with SMTP id n46so12206868otb.9 for ; Tue, 13 Nov 2018 10:12:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=KSSFz+bwVfS+V1wHsw/6+zdIpiLa9TwliygD9z85GOA=; b=qULSqiOGl/CMKS7yxQnaPVp0cm/l1BwzN2YPYGKtUvF3bjSnoTSYVviaPWrnM9koXQ 911mHIpCO1JVNdENo+4jn/s0YQ0xqMexkmU3bo1bSIeRI5PW0HYdiQwRBGCenD8MqOJ6 k2PKMcn8qZ38MEYEpmIKDPz755BHoEa4t7uxxqcOtKkniEQbUxlGDmEpiqYCkqYvOUBI getEa/zmEKFAxq1Z+jfClcDLOuZh33ew87dWw+8iJQjhBnA3pT1ri+GHjXPtrV8feccB QvLzi7SiTVHncRudE2be1dK+2cr4OttDqNlm6P/36II1ZOsZ6GRzgeAgoKneA6fIABFS bNlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=KSSFz+bwVfS+V1wHsw/6+zdIpiLa9TwliygD9z85GOA=; b=hWPXkMAhH4r/r6HGT0pehWav6HYMcGDzssYQhWo4Tg4eWHxEBWAW9tN3CuDralXG42 FhBPmzhMcPNyvvZIDrj8S83y8lpJqQ8dz1kIaWcNujR7gog71mdVUEGMOqmRzlVvEfFr 3X1QlTh0SvzQ4SrI/w8RwTa1tMQPo84RZY5V4tTGWZKEb5Vf301YdvP4h0f4aaoDQmJ4 Mmy2VuoyB1aT7x7FqZF0C9nJn+gLVNTCazTuIeOdX0coot7oVvAnduV3owMQfypa68Mv KresgefmQeYTZfX7KjCHtDbuCnCmO2qJ8+BxEMNRW5KEnj0ncZ4V/yqMdMH25DclHmqP JY0Q== X-Gm-Message-State: AGRZ1gJXv1RbKIYdSOjctjwklvqvPmSYZEWFNJDVIBuHOJlk76I+LZT7 j9U2lGceZZoGTpaRgBHOeoQfP0vy X-Google-Smtp-Source: AJdET5f6gf7L5ozCic0amhcwvbS0CE8cQD+z5M3PpOA+wVoSI4tsUo2AVEAd7Bg63/4ryzTJUDvP8w== X-Received: by 2002:a9d:738a:: with SMTP id j10mr3868801otk.188.1542132762040; Tue, 13 Nov 2018 10:12:42 -0800 (PST) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id 43sm10304232otz.66.2018.11.13.10.12.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 10:12:41 -0800 (PST) Subject: Re: WTF with hash index? To: pgsql-general@lists.postgresql.org References: <425df8ed-d3d1-ead4-06db-224446ded1f3@a-kretschmer.de> From: Ron Message-ID: <6bc22d13-42a5-db93-fc69-78e0eab23c8b@gmail.com> Date: Tue, 13 Nov 2018 12:12:40 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <425df8ed-d3d1-ead4-06db-224446ded1f3@a-kretschmer.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 11/13/2018 12:07 PM, Andreas Kretschmer wrote: > > > Am 13.11.2018 um 17:42 schrieb Олег Самойлов: >> insert into gender (gender) select case when random<0.50 then 'female' >> when random<0.99 then 'male' else 'other' end from (select random() as >> random, generate_series(1,:table_size)) as subselect; > > is that really your intended data distibution? 99% male? select case when random<0.50 then 'female' when random<0.99 then 'male'             else 'other' end from (select random() as random, generate_series(1,:table_size)) as subselect; Shouldn't that make 49% male? -- Angular momentum makes the world go 'round.