Below is psql output:
Welcome to psql, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
dbmail=> explain SELECT messageblk FROM messageblks WHERE message_idnr
= 100::bigint ORDER BY messageblk_idnr limit 1;
NOTICE: QUERY PLAN:
Limit (cost=0.00..777.50 rows=1 width=40)
-> Index Scan using messageblks_id_idx on messageblks
(cost=0.00..1129984.15 rows=1453 width=40)
EXPLAIN
dbmail=> explain SELECT messageblk FROM messageblks WHERE message_idnr
= 100::bigint ORDER BY messageblk_idnr ;
NOTICE: QUERY PLAN:
Sort (cost=5793.33..5793.33 rows=1453 width=40)
-> Index Scan using messageblks_msg_idx on messageblks
(cost=0.00..5716.99 rows=1453 width=40)
EXPLAIN
Philip Warner heeft op woensdag, 20 nov 2002 om 16:14
(Europe/Amsterdam) het volgende geschreven:
At 11:18 AM 20/11/2002 +0100, Roel Rozendaal - IC&S wrote:
SELECT messageblk FROM messageblks WHERE message_idnr =
<number>::bigint ORDER BY messageblk_idnr LIMIT 1;
messed up postgresql in such a way that this query took over 3
minutes to complete! Changing this into
SELECT messageblk FROM messageblks WHERE message_idnr =
<number>::bigint ORDER BY messageblk_idnr;
Any chance of letting me know the PG version, and doing and EXPLAIN on
these? I do not see this behaviour.
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 03 5330 3172 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/
_______________________________________________
Dbmail mailing list
Dbmail@dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail