pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: dclements89@gmail.com
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Fwd: Help required on query performance
Date: Sun, 31 Jan 2010 22:16:15 -0700
Message-ID: <dcc563d11001312116u489f7c3dvcf576b3881e7760a@mail.gmail.com> (raw)
In-Reply-To: <1f30b80c1001312025m118d5798lcb599aeb517beddc@mail.gmail.com>
References: <1f30b80c1001290049ub864091r8298fca3daa0eb69@mail.gmail.com>
	<1f30b80c1001311650q264dfda0uf9894cac3b9e0c3e@mail.gmail.com>
	<28233.1264995140@sss.pgh.pa.us>
	<1f30b80c1001312025m118d5798lcb599aeb517beddc@mail.gmail.com>

On Sun, Jan 31, 2010 at 9:25 PM, Dave Clements <dclements89@gmail.com> wrote:
> After the analyze I am getting the time 3.20 ms but there is not
> HashJoin there. Still all of them are NestLoops. But that is fine.
>
> Now the only problem is the sequence scan on sq_sch_idx table.
> I have a query like this:
>
> explain analyze select count(*) from sq_sch_idx where value = '%download%';
>
> This query does a sequence scan on the table. Is there a way I can
> create an index for this?

If it's not left anchored ( value like 'download%') then not with
regular old methods.  If you need to do text searching you might need
to look into the full text search indexing in pgsql.



view thread (10+ messages)

Message-ID: <dcc563d11001312116u489f7c3dvcf576b3881e7760a@mail.gmail.com>
Permalink:  ../dcc563d11001312116u489f7c3dvcf576b3881e7760a@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d11001312116u489f7c3dvcf576b3881e7760a@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: scott.marlowe@gmail.com, dclements89@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: Fwd: Help required on query performance
  In-Reply-To: <dcc563d11001312116u489f7c3dvcf576b3881e7760a@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox