[GENERAL] How does PostgreSQL recognise "deleted" tuples by using xmax ?

2009-10-26 Thread
How does PostgreSQL recognise "deleted" tuples by using xmax ?

[GENERAL] Test for optimizer

2009-10-14 Thread
I want to test the optimizer of postgresql. Can anyone give me any idea about which kinds of query I should test? large query for path an geqo? subquery?

Re: [GENERAL] Where can I get the number of plans that considered by Planner?

2009-10-12 Thread
Yeah, the problem is when I test large join, the plan considered by geqo is large than path. (3000+ vs 500+). However, the time used in optimizer of geqo is 1/4 of path. By the way, I use the same query. Another thing is for the join of 2 tables, geqo consider 60-90 plans. In general, I think for l

Re: [GENERAL] Where can I get the number of plans that considered by Planner?

2009-10-12 Thread
Is it a reasonable idea to add a counter to set_cheapest? I think this function evaluate the cheapest path. Therefore, it means how many complete plans have been considered, doesn't it? 2009/10/12 纪晓曦 > What I want to count is the number of plans that have been considered > ch

Re: [GENERAL] Where can I get the number of plans that considered by Planner?

2009-10-12 Thread
What I want to count is the number of plans that have been considered cheapest_path. Since if a path is considered to be a cheapest_path, the postgres optimizer need to spent time on comparison. I think this is what I want. 2009/10/4 Martijn van Oosterhout > On Sat, Oct 03, 2009 at 04:20:59PM

Re: [GENERAL] Where can I get the number of plans that considered by Planner?

2009-10-02 Thread
Since I also need to consider gego, is this the best way to do it? 2009/9/30 Tom Lane > =?UTF-8?B?57qq5pmT5pum?= writes: > > Where can I add a integer counter to count the plans considered by > planner. > > Well, you could count the number of calls to add_path, but a path is > hardly the same

Re: [GENERAL] automated row deletion

2009-09-30 Thread
I think there no better way you can get around this problem. You need to check the disk periodically and it is not to hard. 2009/10/1 Dave Huber > I am inserting 250 rows of data (~2kbytes/row) every 5 seconds into a > table (the primary key is a big serial). I need to be able to limit the size

[GENERAL] Where can I get the number of plans that considered by Planner?

2009-09-30 Thread
Where can I add a integer counter to count the plans considered by planner. In my opinion, it is in the src/backend/optimizer/path directorty.

Re: [GENERAL] How to write a constraint which need to check other table?

2009-09-28 Thread
Thank you very much, I think I need to stady more about trigger. 2009/9/28 A. Kretschmer > In response to ? : > > Yes, you are right. That maybe a bad example. what I want to say maybe > like > > this: > > > > create table a ( > > id integer, > > room varchar(32), > >

[GENERAL] How to write a constraint which need to check other table?

2009-09-28 Thread
create table a( name varchar(32); ); create talbe b( name1 varchar(32); name2 varchar(32); ); How to write a constraint to check name1, name2 in the table a without change table defination? ALTER TABLE b ADD CHECK( ??? );

[GENERAL] What is the difference of foreign key?

2009-09-24 Thread
To be precise, The difference between create table a ( foreign key (id) referenced by b(name), ); create table b( id integer referenced by b(name), );

[GENERAL] Where can I find detail information about constraint ?

2009-09-23 Thread
I want detail usage introduction about constraint,such as how to constrain a string to be exactly 4 character and start with 'z'.Where can I find the reference of CHECK? detail usage.

Re: [GENERAL] Does PG cache results of an aggregate function, (and results of non-volatile functions)?

2009-09-19 Thread
Well I don't think the result would keep if you run a "hot" test. However, in one SELECT clause, maybe it can be optimised . 2009/9/3 Allan Kamau > Hi, > I do have a query which make use of the results of an aggregate > function (for example bit_or) several times in the output column list > of

Re: [GENERAL] Can I Save images in postgres?

2009-09-08 Thread
Thank you very much. It seems it is better to save it on file system. 2009/9/9 Yaroslav Tykhiy > On 09/09/2009, at 10:43 AM, John R Pierce wrote: > > 纪晓曦 wrote: >> >>> Can I save images in the postgres? How to define? Does the format >>> matters? Can I save JP

[GENERAL] Can I Save images in postgres?

2009-09-08 Thread
Can I save images in the postgres? How to define? Does the format matters? Can I save JPG/PNG?How?

[GENERAL] Moving avg using SQL

2009-09-03 Thread
How can I do a moving avg by only using SQL?

[GENERAL] trick problem

2009-09-03 Thread
Consider the following relational schema about daily stock prices. StockPrice (stockid; timeid; price) We make the simplifying assumption that timeid is an integer that count the number of days from a particular date in the past (that is, the stock prices on the x-th day can be found by a simple se