best index for timestamp field null and not null queries

From: Jeremy Wells <jemmyw(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: best index for timestamp field null and not null queries
Date: 2012-08-26 07:08:36
Message-ID: B3A5A722BF4D475FAB548FB93409C50E@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi, I've got a database table with a datetime column "deleted_at". I'll be running lots of queries against the table but they'll all be of the nature "deleted_at IS NULL" and "deleted_at IS NOT NULL".

What's the best index to place on this column? I assume if I add just a straight index then it'll index all of the values that go into it.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Gavin Flower 2012-08-26 09:35:29 Re: best index for timestamp field null and not null queries
Previous Message Prima Chairunnanda 2012-08-25 19:33:11 Re: Hot Standby Lagging Behind