Re: [GENERAL] Data comparison SQL in PG 8.2.9

2009-01-12 Thread Phoenix Kiula
2009/1/12 Thomas Markus : > be sure to use correct data types. I suppose psql uses timestamps so > > select id from users where modify_date = '2009-01-08' limit 1; > > is converted to > > select id from users where modify_date = '2009-01-08 00:00:00'::timestamp > limit 1; > > > try > > select id fr

Re: [GENERAL] Data comparison SQL in PG 8.2.9

2009-01-12 Thread Thomas Markus
check explain analyze tried this on 8.3 with real life data: -- all rows, index useless explain analyze select id from cl_customer where modified > '2008-01-01' Seq Scan on cl_customer (cost=0.00..38958.79 rows=1448639 width=8) (actual time=0.030..682.940 rows=1448783 loops=1) Filter: (modi

Re: [GENERAL] Data comparison SQL in PG 8.2.9

2009-01-12 Thread Reg Me Please
On Monday 12 January 2009 09:40:22 Phoenix Kiula wrote: > 2009/1/12 Thomas Markus : > Thanks. But it used to work without this, and more importantly, this > doesn't explain why the ">" queries are so exceedingly slow now! Any > thoughts? When queries used to be fast and now are slow very often de

Re: [GENERAL] Data comparison SQL in PG 8.2.9

2009-01-12 Thread Phoenix Kiula
> When queries used to be fast and now are slow very often depends upon the > indexes. Less frequently upon the amount of memory available for cache and > the server configuration. > Do you used ti have any index on that column? > Do you have server configuration files for comparison? The config

Re: [GENERAL] Data comparison SQL in PG 8.2.9

2009-01-12 Thread Reg Me Please
On Monday 12 January 2009 10:18:59 Phoenix Kiula wrote: > > When queries used to be fast and now are slow very often depends upon the > > indexes. Less frequently upon the amount of memory available for cache > > and the server configuration. > > Do you used ti have any index on that column? > > Do

Re: [GENERAL] How do I 'include' a stored procedure in a SQL script file

2009-01-12 Thread DonnaR
Currently I'm using PGAdmin to create everything, but I need to create a script file to create the schemas and the tables to ultimately run outside of PGAdmin. Since I have triggers, I need to 'load in' the (long) stored/triggered procedures during this process (ie 'call or 'include' another file

Re: [GENERAL] domain+enum

2009-01-12 Thread Grzegorz Jaśkiewicz
Tom, will you guys consider changing that for 8.4 ? I know there was a discussion about that on hackers, and everyone pretty much agreed it would be nice to fix it - so it works as expected. thanks. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your sub

Re: [GENERAL] How do I 'include' a stored procedure in a SQL script file

2009-01-12 Thread Adrian Klaver
On Monday 12 January 2009 3:14:56 am DonnaR wrote: > Currently I'm using PGAdmin to create everything, but I need to create a > script file to create the schemas and the tables to ultimately run outside > of PGAdmin. Since I have triggers, I need to 'load in' the (long) > stored/triggered procedure

Re: [GENERAL] Data comparison SQL in PG 8.2.9

2009-01-12 Thread Shane Ambler
Phoenix Kiula wrote: Table "public.users" Column |Type | Modifiers ---+-+-- modify_date | timestamp without time zone |

Re: [GENERAL] Slow Vacuum was: vacuum output question

2009-01-12 Thread Dan Armbrust
> Well, your throughput on this machine is horrible. It looks like with > 8.1 all your time is sys + cpu for your cpus, while with 8.3 you've > got more idle and more i/o wait, which tells me that 8.3 is smarter > about vacuuming, so it's spending less time working the cpus and more > time waiting

[GENERAL] PgUS 2008 end of year summary

2009-01-12 Thread Joshua D. Drake
Hello, It is now 2009 and time for a, "Thanks for all the laughs 2008!" 2008 was the year that PgUS spent getting its feet under itself. We formed our board, filed all of our legally required paperwork, paid a lot of money to attorneys, held elections and even managed to have some fun by working

[GENERAL] Indexing columns with low cardinality: persistent bitmap indexes?

2009-01-12 Thread Bruno Lavoie
Hello, I have a column with a small number of distinct values, indexing this one with a standard BTree is useless. How do I can index this column efficiently? I searched and it seems that pg doesn't support the creation of persistent bitmap indexes... Is that feature planned in next releases

Re: [GENERAL] Indexing columns with low cardinality: persistent bitmap indexes?

2009-01-12 Thread Alvaro Herrera
Bruno Lavoie escribió: > Hello, > > I have a column with a small number of distinct values, indexing this > one with a standard BTree is useless. How do I can index this column > efficiently? I searched and it seems that pg doesn't support the > creation of persistent bitmap indexes... It

Re: [GENERAL] Indexing columns with low cardinality: persistent bitmap indexes?

2009-01-12 Thread Reg Me Please
On Monday 12 January 2009 21:38:02 Bruno Lavoie wrote: > Hello, > > I have a column with a small number of distinct values, indexing this > one with a standard BTree is useless. How do I can index this column > efficiently? I searched and it seems that pg doesn't support the > creation of persiste

Re: [GENERAL] Indexing columns with low cardinality: persistent bitmap indexes?

2009-01-12 Thread Jaime Casanova
On Mon, Jan 12, 2009 at 4:16 PM, Reg Me Please wrote: > On Monday 12 January 2009 21:38:02 Bruno Lavoie wrote: >> Hello, >> >> I have a column with a small number of distinct values, indexing this >> one with a standard BTree is useless. How do I can index this column >> efficiently? I searched a

Re: [GENERAL] Indexing columns with low cardinality: persistent bitmap indexes?

2009-01-12 Thread Scott Marlowe
On Mon, Jan 12, 2009 at 1:38 PM, Bruno Lavoie wrote: > Hello, > > I have a column with a small number of distinct values, indexing this one > with a standard BTree is useless. How do I can index this column > efficiently? I searched and it seems that pg doesn't support the creation of > persisten

Re: [GENERAL] PgUS 2008 end of year summary

2009-01-12 Thread Alvaro Herrera
Joshua D. Drake wrote: > Hello, > > It is now 2009 and time for a, "Thanks for all the laughs 2008!" That's all great, congratulations. In the future please do not spam multiple lists with the same message. Or rather, if you want the message to appear in more than one list, please CC them all in

Re: [GENERAL] PgUS 2008 end of year summary

2009-01-12 Thread Joshua D. Drake
On Mon, 2009-01-12 at 18:34 -0300, Alvaro Herrera wrote: > Joshua D. Drake wrote: > > Hello, > > > > It is now 2009 and time for a, "Thanks for all the laughs 2008!" > > That's all great, congratulations. > > In the future please do not spam multiple lists with the same message. > Or rather, if

Re: [GENERAL] Indexing columns with low cardinality: persistentbitmap indexes?

2009-01-12 Thread Dann Corbit
> -Original Message- > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general- > ow...@postgresql.org] On Behalf Of Alvaro Herrera > Sent: Monday, January 12, 2009 12:41 PM > To: Bruno Lavoie > Cc: PostgreSQL > Subject: Re: [GENERAL] Indexing columns with low cardinality: > persiste

Re: [GENERAL] Indexing columns with low cardinality: persistent bitmap indexes?

2009-01-12 Thread Martin Gainty
Jaime- Porque no utiliza Bitmap? *Saludos Cordiales desde EEUU* Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and

Re: [GENERAL] Indexing columns with low cardinality: persistent bitmap indexes?

2009-01-12 Thread Adam Rich
> > Hello, > > > > I have a column with a small number of distinct values, indexing this one > > with a standard BTree is useless. How do I can index this column > > efficiently? I searched and it seems that pg doesn't support the creation of > > persistent bitmap indexes... Is that feature planne

Re: [GENERAL] PgUS 2008 end of year summary

2009-01-12 Thread Alvaro Herrera
Joshua D. Drake wrote: > On Mon, 2009-01-12 at 18:34 -0300, Alvaro Herrera wrote: > > In the future please do not spam multiple lists with the same message. > > Or rather, if you want the message to appear in more than one list, > > please CC them all in a single message instead of sending one mes

Re: [GENERAL] PgUS 2008 end of year summary

2009-01-12 Thread Joshua D. Drake
On Mon, 2009-01-12 at 20:18 -0300, Alvaro Herrera wrote: > Cross posting is not necessarily bad; in fact it's regarded to be less > annoying than multiposting, which is what you did. For argumentation, > see here > http://www.cs.tut.fi/~jkorpela/usenet/xpost.html#why > > (If you want it to be ev

Re: [GENERAL] PgUS 2008 end of year summary

2009-01-12 Thread Gregory Stark
Alvaro Herrera writes: > Joshua D. Drake wrote: >> On Mon, 2009-01-12 at 18:34 -0300, Alvaro Herrera wrote: > >> > In the future please do not spam multiple lists with the same message. >> > Or rather, if you want the message to appear in more than one list, >> > please CC them all in a single me

Re: [GENERAL] PgUS 2008 end of year summary

2009-01-12 Thread Alvaro Herrera
Gregory Stark wrote: > Alvaro Herrera writes: > > > Cross posting is not necessarily bad; in fact it's regarded to be less > > annoying than multiposting, which is what you did. For argumentation, > > see here > > http://www.cs.tut.fi/~jkorpela/usenet/xpost.html#why > > Well cross-posting is es

Re: [GENERAL] PgUS 2008 end of year summary

2009-01-12 Thread Alvaro Herrera
Alvaro Herrera wrote: > Gregory Stark wrote: > > Alvaro Herrera writes: > > > (If you want it to be even more pain-free, add a Reply-To: > > > pgsql-advocacy header or some such.) > > > > Yeah, actually that doesn't work. > > Hmm, it doesn't work how? I admit I haven't tried it, so I'm using t

Re: [GENERAL] PgUS 2008 end of year summary

2009-01-12 Thread Gregory Stark
Alvaro Herrera writes: > Gregory Stark wrote: >> Alvaro Herrera writes: >> >> Well cross-posting is especially annoying on subscriber-only moderated lists >> such as ours. Anyone who follows up to an email who isn't subscribed to all >> the lists will get bounce warnings for each list they're

Re: [pgsql-advocacy] [GENERAL] PgUS 2008 end of year summary

2009-01-12 Thread Alvaro Herrera
Gregory Stark wrote: > > Alvaro Herrera writes: > > > Gregory Stark wrote: > >> Alvaro Herrera writes: > >> > >> Well cross-posting is especially annoying on subscriber-only moderated > >> lists > >> such as ours. Anyone who follows up to an email who isn't subscribed to all > >> the lists wi

Re: [pgsql-advocacy] [GENERAL] PgUS 2008 end of year summary

2009-01-12 Thread Scott Marlowe
On Mon, Jan 12, 2009 at 6:46 PM, Alvaro Herrera wrote: > Gregory Stark wrote: >> >> Alvaro Herrera writes: >> >> > Gregory Stark wrote: >> >> Alvaro Herrera writes: >> >> >> >> Well cross-posting is especially annoying on subscriber-only moderated >> >> lists >> >> such as ours. Anyone who foll

[GENERAL] Trying to create implicit casts to text in PG 8.3

2009-01-12 Thread Aleksander Kmetec
Hi, everyone. I'm trying to upgrade a database which is used by several hundred installations of an app; with each installation possibly running some custom code and 3rd party extensions. I was hoping that it would be possible to re-add implicit casts to text for bacwards compatibility with 8.2

Re: [GENERAL] Query planner and foreign key constraints

2009-01-12 Thread Christian Schröder
Christian Schröder wrote: When I join both tables using key1 and key2 there will be exactly 1630788 rows because for each row in table2 there *must* exist a row in table1. But the query planner doesn't think so: # explain analyze select * from table1 inner join table2 using (key1, key2);