Re: [HACKERS] Query caching

2000-11-12 Thread Karel Zak
On Fri, 10 Nov 2000 [EMAIL PROTECTED] wrote: > Did someone think about query costs ? Is you prepare > query like SELECT id FROM t1 WHERE type=$1 and > execute it with $1=1 and 2. For 1 there is one record > in t1 a all other have type=2. > Without caching, first query will use index, second > not

Re: [HACKERS] Query caching

2000-11-10 Thread devik
Did someone think about query costs ? Is you prepare query like SELECT id FROM t1 WHERE type=$1 and execute it with $1=1 and 2. For 1 there is one record in t1 a all other have type=2. Without caching, first query will use index, second not. Should cached plan use index or not ? devik Christof Pe

Re: [HACKERS] Query caching

2000-11-09 Thread Christof Petig
Karel Zak wrote: > On Wed, 8 Nov 2000, Christof Petig wrote: > > > Karel Zak wrote: > > > > > > What about parameters? Normally you can prepare a statement and execute it > > > > > > We have in PG parameters, see SPI, but now it's used inside backend only > > > and not exist statement that allow