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 Christopher Kings-Lynne
Have you tried playing with the statistics gatherer? >From the ANALYZE docs: "The extent of analysis can be controlled by adjusting the per-column statistics target with ALTER TABLE ALTER COLUMN SET STATISTICS (see ALTER TABLE). The target value sets the maximum number of entries in the most-com

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 Christopher Kings-Lynne
> 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 > the data from each station for the day and then repeated for each station > and then finally dumped the entire day into the DB. Are you saying

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 Stephan Szabo
On Tue, 23 Jul 2002, Daryl Herzmann wrote: > Hi! > > Thanks for the continued help. > > I have attached the results of your request. Thank you! Hmm, when the data was put in, was it put in where the same value would be bunched up? IIRC that's a case the optimizer won't realize if the data isn'

Re: [SQL] FATAL 1

2002-07-23 Thread Bruce Momjian
It means something is really wacked out about your installation. What does the server log show? --- Ian Cass wrote: > Couldn't find any mention of this anywhere. Anyone any idea what it means? A > db stop/start seems to ha

Re: [SQL] 7.3 features and enhancements

2002-07-23 Thread Bruce Momjian
Read the TODO list on the developer's web site. All the dashed items are ready for 7.3. --- mark carew wrote: > Hi All, > > Can somebody direct me to a list of the above. Would be nice to know in > advance of its rele

Re: [SQL] Scan SQL

2002-07-23 Thread Josh Jore
On Tue, 23 Jul 2002, Roberto Mello wrote: > On Tue, Jul 23, 2002 at 10:11:18AM -0300, Sandro Joel Eller wrote: > > Hi > > > > I need to make a parser in a sql to get tables and fields to verify the > > privileges. Do anybody know software, function or anything that can help me? > > > > I found so

Re: [SQL] Misunderstanding about your article entitled: Episode 2:

2002-07-23 Thread Josh Berkus
Mike, > "Technical Note: as of PostgreSQL 7.2.1, DEFERRABLE UNIQUE > constraints are > not supported -- which means that you should not declare unique > constraints > on columns whose values will be frequently re-arranged, like custom > sort > order columns, even if the values in these columns

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] Scan SQL

2002-07-23 Thread Roberto Mello
On Tue, Jul 23, 2002 at 10:11:18AM -0300, Sandro Joel Eller wrote: > Hi > > I need to make a parser in a sql to get tables and fields to verify the > privileges. Do anybody know software, function or anything that can help me? > > I found software to create a compiler and generate the source in

Re: [SQL] Queries not using Index

2002-07-23 Thread Stephan Szabo
On Tue, 23 Jul 2002, Daryl Herzmann wrote: > > >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..3

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=38146 loops=1) >> Total runtime: 3748.33 msec >

Re: [SQL] [GENERAL] No command history in psql

2002-07-23 Thread Robert Treat
ldd /path/to/psql should tell you if its finding the readline libraries. you might also want to do ldconfig -v | grep 'history' and ldconfig -v | grep 'readline' to see what libraries you have. you can then verify that the libs you have are actually where your telling pg they are supposed to b

Re: [SQL] Scan SQL

2002-07-23 Thread Josh Berkus
Sandro, > I need to make a parser in a sql to get tables and fields to verify > the > privileges. Do anybody know software, function or anything that can > help me? I probably can, but I'm not quite sure what you're asking for. Could you explain at greater length, maybe with some examples? -

Re: [SQL] Editor for pgsql

2002-07-23 Thread Josh Berkus
Folks, > This compiles and installes just fine to /usr/local/bin with > PostgreSQL > support. Thanks, I'll try it. -Josh Berkus ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [SQL] Queries not using Index

2002-07-23 Thread Stephan Szabo
On Mon, 22 Jul 2002, Daryl Herzmann wrote: > snet=# explain SELECT * from t2002_06 WHERE station = 'SGLI4'; > NOTICE: QUERY PLAN: > > Seq Scan on t2002_06 (cost=0.00..35379.69 rows=35564 width=47) > > EXPLAIN What does explain show if you do set enable_seqscan=off; ? It's possible that it's e

Re: [SQL] Editor for pgsql

2002-07-23 Thread Andreas Joseph Krogh
On Tuesday 23 July 2002 07:45, Roberto Mello wrote: > On Mon, Jul 22, 2002 at 05:41:39PM -0700, Josh Berkus wrote: > > I tried to install Tora, but the build blew up since I don't have Oracle > > installed. Any tips? > > I just use the Debian packages (/me hugs Debian). > > AFAIK, all you have to

[SQL] Scan SQL

2002-07-23 Thread Sandro Joel Eller
Hi I need to make a parser in a sql to get tables and fields to verify the privileges. Do anybody know software, function or anything that can help me? I found software to create a compiler and generate the source in delphi, but I need a sql specification (BNF, EBNF) and I do not know where to

Re: [SQL] Queries not using Index

2002-07-23 Thread Gaetano Mendola
"Daryl Herzmann" <[EMAIL PROTECTED]> wrote: > snet=# select count(valid) from t2002_06; > count > - > 1513895 > snet=# explain SELECT * from t2002_06 WHERE station = 'SGLI4'; > NOTICE: QUERY PLAN: > > Seq Scan on t2002_06 (cost=0.00..35379.69 rows=35564 width=47) Can you do the

[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

Re: [SQL] pg_dump and sequences

2002-07-23 Thread Achilleus Mantzios
On Tue, 23 Jul 2002, Achilleus Mantzios wrote: Just a correction > Hi, i am using postgreSQL 7.2.1 on a redhat 7.2 (kernel > 2.4.9-31,glibc-2.2.4-24). > > It seems that pg_dump -t "tablename" dumps correctly the sequence of a > table's column,when the column is named after "id". >

[SQL] pg_dump and sequences

2002-07-23 Thread Achilleus Mantzios
Hi, i am using postgreSQL 7.2.1 on a redhat 7.2 (kernel 2.4.9-31,glibc-2.2.4-24). It seems that pg_dump -t "tablename" dumps correctly the sequence of a table's column,when the column is named after "id". For example, dynacom=# CREATE TABLE foo2 (fid serial NOT NULL UNIQUE PRIMARY KEY,id ser