Re: [SQL] Queries not using Index

2002-07-24 Thread Daryl Herzmann
Hi! Thanks for your help! On Tue, 23 Jul 2002, Gaetano Mendola wrote: >"Daryl Herzmann" <[EMAIL PROTECTED]> wrote: >> snet=# select count(valid) from t2002_06; >> count >> - >> 1513895 > >> snet=# explain SELECT * from t200

Re: RES: [SQL] Queries not using Index

2002-07-24 Thread Daryl Herzmann
Hi! Thanks for the help. Please see my responses below. On Wed, 24 Jul 2002, Elielson Fontanezi wrote: > What kind of index is t2002_06_station_idx? snet=# select indexdef from pg_indexes where indexname='t2002_06_station_idx'; indexdef

Re: [SQL] Queries not using Index

2002-07-23 Thread Daryl Herzmann
Hi! :) On Wed, 24 Jul 2002, Christopher Kings-Lynne wrote: >Have you tried playing with the statistics gatherer? Nope. I will look at the docs some and play around. This machine is not fully production yet. :) >Also, what is the result of: >select indexdef from pg_indexes where indexname='t

Re: [SQL] Queries not using Index

2002-07-23 Thread Daryl Herzmann
Hi, >You _have_ actually run ANALYZE on the table, right? snet=# vacuum analyze t2002_06; VACUUM snet=# vacuum analyze; VACUUM snet=# explain analyze select * from t2002_06 WHERE station = 'SAMI4'; NOTICE: QUERY PLAN: Seq Scan on t2002_06 (cost=0.00..35379.69 rows=35169 width=47) (actual tim

Re: [SQL] Queries not using Index

2002-07-23 Thread Daryl Herzmann
Good evening. On Tue, 23 Jul 2002, Stephan Szabo wrote: >Hmm, when the data was put in, was it put in where the same value >would be bunched up? I inserted the data via 30 "COPY t2002_06 from stdin" (one per day) So it was grouped by station and then day for each insert. (My script dumped

Re: [SQL] Queries not using Index

2002-07-23 Thread Daryl Herzmann
Hi! Thanks for the continued help. I have attached the results of your request. Thank you! Daryl >Right... sorry about that... >select * from pg_statistic where starelid=(select oid from pg_class > where relname='t2002_06'; sql.out.gz Description: GNU Zip compressed data ---

Re: [SQL] Queries not using Index

2002-07-23 Thread Daryl Herzmann
>On Tue, 23 Jul 2002, Daryl Herzmann wrote: > >> snet=# explain analyze select * from t2002_06 WHERE station = 'SAMI4'; >> NOTICE: QUERY PLAN: >> >> Seq Scan on t2002_06 (cost=0.00..35379.69 rows=34979 width=47) (actual >> time=67.89..3734.93 rows

[SQL] Queries not using Index

2002-07-23 Thread Daryl Herzmann
Greetings, I suppose I should have sent this to pgsql-bugs maybe? I would appreciate it if anybody could help me out. I can't figure out what is going on here... snet=# select version(); version ---

[SQL] Queries not using Index

2002-07-23 Thread Daryl Herzmann
(sorry if you get this twice, my first post bounced since I did not use the subscribed email account. I assume that those messages get discarded...) Greetings, I suppose I should have sent this to pgsql-bugs maybe? I would appreciate it if anybody could help me out. I can't figure out what

[SQL] Maybe a Bug, maybe bad SQL

2001-03-20 Thread Daryl Herzmann
t values('2000_04_03'); INSERT 13166283 1 akrherz=# select day, date_part('day', day) AS day from test; day | day +- 2000-04-02 | 1 2000-04-01 | 1 2000-04-03 | 3 (3 rows) Is this fixed in a newer version? Am I doing someth

[SQL] SQL Question

2000-08-01 Thread Daryl Herzmann
Hello, I hope this question is not too novice for this group. I have a table portfolio=# \d questions Table "questions" Attribute |Type | Modifier ---+-+---