[HACKERS] subselect in the column list

2012-03-13 Thread amit sehas
If we have a query of the form: Select *, (Select * FROM T2 WHERE p2 = T1.p1) FROM T1 ORDER BY 1 WHERE p3 = 75 In SQL, if a subselect is present in the column-list, is the result set of this subselect considered to be a part of a single tuple returned from the outer query, or does the result set

[HACKERS] Behavior of subselects in target lists and order by

2012-02-24 Thread amit sehas
If we have a query of the form: Select *, (Select * FROM T2 WHERE p2 = T1.p1) FROM T1 ORDER BY 1 WHERE p3 = 75 In the above query there is a subselect in the target list and the ORDERBY has an ordinal number which indicates order by column 1. Does this mean that the above query will return all

Re: [HACKERS] Cursor behavior

2011-12-22 Thread amit sehas
: Re: [HACKERS] Cursor behavior To: amit sehas cu...@yahoo.com Cc: pgsql-hackers@postgresql.org Date: Wednesday, December 21, 2011, 8:43 AM On Thu, Dec 15, 2011 at 4:15 PM, amit sehas cu...@yahoo.com wrote: I had a question about the cursor internals implementation. When you Fetch next 'n

[HACKERS] Cursor behavior

2011-12-18 Thread amit sehas
HI, I had a question about the cursor internals implementation. When you Fetch next 'n' results without moving the cursors, is this kind of functionality implemented by firstly executing the whole query and then moving the cursor over the results, or are the movements done on active database

[HACKERS] array behavior

2011-12-18 Thread amit sehas
If a field(attribute) in a type is declared to be an array. Then is it always the case that the array will be packed into a single tuple that resides in the database. There is the TOAST mechanism for oversized tuples but that is still considered to be a single tuple. Is there any circumstance

[HACKERS] query execution question

2011-02-09 Thread amit sehas
We are making some performance measurements, we are trying to determine query execution behavior. Lets say we have 4 tables T1, T2, T3 and T4 and the query has the form: select * from T1, T2, T3, T4 where (T1.a = T2.b and T2.c = T3.d T3.e = T4.f) where a,b,c,d,e,f are properties of the

[HACKERS] optimization histograms

2010-12-21 Thread amit sehas
HI, for the histograms for cost based optimization, is there a rule of thumb on how often to rebuild them? They are obviously not being continuously updated...what is the state of the art in this area, do all the other databases also end up with stale statistics every now and then and have to