On Sun, Apr 24, 2016 at 3:14 PM, bricklen wrote:
> Query plan for the md5() index test:
>
> Index Scan using lots_of_columns_md5_idx on lots_of_columns
> (cost=0.93..3.94 rows=1 width=208) (actual time=0.043..0.043 rows=1 loops=1)
>Index Cond:
At that point would it be better to just use a boolean array?
Here is an example I just wrote up that does pretty damn fast searches.
SET work_mem = '256 MB';
CREATE TABLE test_bool AS
SELECT id, array_agg(random() < 0.85) as boolean_column
FROM generate_series(1, 100)
CROSS JOIN
This one is quick, running in 20ms:
SELECT b.id, b.status
FROM export b, masterOld mb
WHERE mb.sperre IS NULL
AND mb.status IS NULL
AND b.id_firma = mb.id_firma
LIMIT 100;
http://explain.depesz.com/s/SCBo
This one ist the burden, running at least 100 seconds:
Sven Kerkling wrote:
> This one ist the burden, running at least 100 seconds:
>
> SELECT b.id, b.status
> FROM export b, masterNew mb
> WHERE mb.sperre IS NULL
> AND mb.status IS NULL
> AND b.id = mb.id
> LIMIT 100;
>
> http://explain.depesz.com/s/eAqG
I think the