Re: Planning without reason.
От | Martijn van Oosterhout |
---|---|
Тема | Re: Planning without reason. |
Дата | |
Msg-id | 20060623131447.GD8900@svana.org обсуждение исходный текст |
Ответ на | Planning without reason. (Tzahi Fadida <Tzahi.ML@gmail.com>) |
Ответы |
Re: Planning without reason.
Re: Planning without reason. |
Список | pgsql-hackers |
On Fri, Jun 23, 2006 at 03:57:19PM +0300, Tzahi Fadida wrote: > R contains indices but not on all attributes or not on > all ordered subset of keys. > > Query example: > (SELECT * FROM R > WHERE a=3, b=6,. ...) > UNION > (SELECT * FROM R > WHERE b=5, d=2,. ...) > UNION > .... > And lots of unions. Do you need UNION, or do you actually mean UNION ALL? Also, couldn't you just do: SELECT * FROM R WHERE (a=3, b=6, ...) OR (b=5, d=2, ...) etc > I am currently just writing the query as a string and open a cursor. > Is there a simple way to use Datums instead of converting the attributes to > strings to create a plan for SPI. > 10x. I imagine SPI_prepare() and SPI_execp() would be used for this. Have a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
В списке pgsql-hackers по дате отправления: