From: | "Timothy H(dot) Keitt" <keitt(at)nceas(dot)ucsb(dot)edu> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | query seems too slow |
Date: | 1999-11-03 19:17:52 |
Message-ID: | 38208A60.253E1B94@nceas.ucsb.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm trying to join two tables, one with > 3M rows and another with a few
thousand rows, and store the output in a new table. "EXPLAIN" gives the
following output:
keitt=> explain select tenstop.* into tmp from tenstop, history where
tenstop.route_id = history.route_id and tenstop.year = history.year and
history.run_type = 1;
NOTICE: QUERY PLAN:
Nested Loop (cost=6.15 rows=1 width=56)
-> Index Scan using history_run_type_index on history (cost=2.05
rows=2 width=8)
-> Index Scan using tenstop_year_index on tenstop (cost=2.05
rows=3316684 width=48)
EXPLAIN
keitt=>
I fired this off yesterday and it was still not finished this morning
after 12+ hours. Should I be suprised? How long should a query like
this take? (This is on a PII 450 w/ 256M ram.)
Tim
--
Timothy H. Keitt
National Center for Ecological Analysis and Synthesis
735 State Street, Suite 300, Santa Barbara, CA 93101
Phone: 805-892-2519, FAX: 805-892-2510
http://www.nceas.ucsb.edu/~keitt/
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Drabble | 1999-11-03 19:18:18 | Re: [GENERAL] Dynamic update |
Previous Message | Alain TESIO | 1999-11-03 19:09:09 | Re: [GENERAL] Dynamic update |