On Wed, Mar 8, 2017 at 3:32 PM, Patrick B wrote:
> Why is SEQ SCAN faster than index scan?
>
Same number of evaluated record and less effort-per-record. You only win
with an index if you can evaluate fewer records to make up for the extra
effort per record that querying an index involves compa
> When one uses “enable_” settings to adjust planner behavior, PostgreSQL
> just sets really high costs for the operations affected (like the one you
> see).
>
> As SeqScan is the only possible way to execute your query, it is still
> choosen.
>
I get it. Thanks!
--
Amit Langote
--
Sent via pg
>> Although, I suspect the (dropped index + enable_seqscan) causes this,
>> is the cost shown in explain output some kind of default max or
>> something like that for such abnormal cases?
>
> When you set enable_xxx=off, it not actually disables the xxx
> operation, it sets the start cost to the hi
2013/5/27 Amit Langote
> Although, I suspect the (dropped index + enable_seqscan) causes this,
> is the cost shown in explain output some kind of default max or
> something like that for such abnormal cases?
>
When one uses “enable_” settings to adjust planner behavior, PostgreSQL
just sets real
On Mon, May 27, 2013 at 12:42 AM, Amit Langote wrote:
> I set enable_seqscan=off and also accidentally dropped the only index
[...]
> Seq Scan on testdata (cost=100.00..101.10 rows=2 width=71)
[...]
> Although, I suspect the (dropped index + enable_seqscan) causes this,
> is the
Tom Lane wrote:
> Andreas Kretschmer writes:
> > production=*# explain analyse select * from boxes;
> > QUERY PLAN
> > ---
> > Seq Scan o
Andreas Kretschmer writes:
> production=*# explain analyse select * from boxes;
> QUERY PLAN
> ---
> Seq Scan on boxes (cost=0.00..990783.
On 3 Červenec 2012, 17:58, Andreas Kretschmer wrote:
> Dear list,
>
> i have a table and i'm selecting all records without a where-condition,
> and i don't need a ORDER BY:
>
>
>
> production=*# explain analyse select * from boxes;
> QUERY PLAN
> --
Ok, Thank all for the clarification.
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
Kevin Hunter <[EMAIL PROTECTED]> writes:
> At 1:17p -0400 on 01 Jun 2007, Tyler Durden wrote:
>> I find strange that a simple SELECT COUNT(...) is so slow with only
>> 700 000 records.
> The much more knowledgable will correct me, but the abbr. version is
> that it is for data integrity and corr
of the conversation.
breaks the flow
because it
toppost
Please don't
At 1:17p -0400 on 01 Jun 2007, Tyler Durden wrote:
Yes, either case happens the same.
I'm come recently from MySQL and it works in a different way.
I find strange that a simple SELECT COUNT(...) is so slow with only
700 000 re
Tyler Durden wrote:
Hi,
I'm having some problems in performance in a simple select count(id)
from I have 700 000 records in one table, and when I do:
# explain select (id) from table_name;
-[ RECORD 1
]
QUERY PLAN | Seq Scan on
On Fri, 2007-06-01 at 18:24 +0100, Tyler Durden wrote:
> It uses Index Scan for id>20 and Seq Scan for id>10?!
Based on the statistics pg has for your table, and on the cost of using
the index, the cost based optimizer decided that it's more efficient to
seq scan all of the rows than to incu
On Jun 1, 2007, at 12:24 , Tyler Durden wrote:
On 6/1/07, Joshua D. Drake <[EMAIL PROTECTED]> wrote:
Nothing. You have to scan the table because you aren't giving
postgresql
anything to use the index by.
# explain ANALYZE select id from table_name where id>20;
Ok, my bad.
But why this happens:
# explain ANALYZE select id from table_name where id>20;
QUERY PLAN
Yes, either case happens the same.
I'm come recently from MySQL and it works in a different way.
I find strange that a simple SELECT COUNT(...) is so slow with only
700 000 records.
Has been a nightmare optimizing this tables/queries.
Sorry about this silly question, but I'm new to Posgresql.
Th
Tyler Durden wrote:
I'm having some problems in performance in a simple select count(id)
from I have 700 000 records in one table, and when I do:
# explain select (id) from table_name;
-[ RECORD
1 ]
QUERY PLAN | Seq Scan on t
On Wed, Oct 26, 2005 at 06:55:54PM -0700, Edoceo Lists wrote:
> I'm thinking that my queries are not using indexs correctly and
> therefore taking longer to complete than they should.
Index scans aren't necessarily faster than sequential scans: if the
query reads a significant amount of the table
> I think I have found out why.. I have a where clause on a ID field but it
> seems like I need to cast this integer to the same integer as the field is
> defined in the table, else it will do a tablescan.
Yes, this is correct
> Is this assumtion correct? And if it is, do I then need to change al
19 matches
Mail list logo