Thread: Regarding Sequential Scans count increase each time we press refresh .

Regarding Sequential Scans count increase each time we press refresh .

From
keshav upadhyaya
Date:
Hi ,

I have one table  my_test table . with on index created on one column .


I have turned off the sequential scans .

Now when ever i do refresh on this table or press F5 , It increase the sequential scans count and
Sequential tuple read count .

Pls help me to understand what exactly is happening ?  Is it scanning the Table sequentially once i press refresh  ?

Thanks,
keshav




--
Thanks,
Keshav Upadhyaya

Re: Regarding Sequential Scans count increase each time we press refresh .

From
Josh Kupershmidt
Date:
On Thu, Sep 24, 2009 at 1:41 PM, keshav upadhyaya <ukeshav2009@gmail.com> wrote:
> I have one table  my_test table . with on index created on one column .
>
>
> I have turned off the sequential scans .
>
> Now when ever i do refresh on this table or press F5 , It increase the
> sequential scans count and
> Sequential tuple read count .
>
> Pls help me to understand what exactly is happening ?  Is it scanning the
> Table sequentially once i press refresh  ?

Assuming by "turned off the sequential scans", you mean that you've set the
config parameter enable_seqscan=off , note that the documentation says
"It's not possible to suppress sequential scans entirely, but turning
this variable
off discourages the planner from using one if there are other methods
available."

http://www.postgresql.org/docs/current/static/runtime-config-query.html

It sounds like you're accessing your Postgres database through something like
phpPgAdmin or a similar web interface, and you're running a query like:
 SELECT * FROM mytable

A query like this is going to use a sequential scan, regardless of the setting
of enable_seqscan.

Josh