Re: Selecting Large Object and TOAST

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Selecting Large Object and TOAST
Дата
Msg-id 87lkyzjm1q.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Selecting Large Object and TOAST  (vishal saberwal <vishalsaberwal@gmail.com>)
Список pgsql-general
vishal saberwal <vishalsaberwal@gmail.com> writes:

> So are you suggesting, I need to send the Large object ID to the client?
> Since the application is time critical, is there a way to skip one of the
> two steps (querying once for LOID and then again for its data) to a one step
> by sending the Object data in the first call?

The main reason to use large objects at all is if you have a need to read and
write *parts* of the data. For instance if your data is being served up by a
web server then you may want to be able to pipeline the data in chunks instead
of waiting until you can download the entire object from the database. So you
would use loread() to read out one chunk, stuff it into your network buffers,
then loop back and loread() the next chunk.

If all you want to do is store and read the entire object in a single query
then large objects don't really have any advantage for you. Postgres removes
many of the limitations that legacy databases imposed on regular data types
that made large objects necessary for such routine storage.

--
greg

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Preventing or controlling runaway queries
Следующее
От: Eric E
Дата:
Сообщение: Re: Preventing or controlling runaway queries