PostgresV2 and bulk resultsets

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

PostgresV2 and bulk resultsets

Petr Fischer-3
Hi,

if I call:
conn execute: 'select * from one_milion_table'
it seems that all table rows are loaded into memory - right?

Is there an easy way to only iterate (do:) result set records without  
internal loading bulky resultset into some sort of internal arrays?

Thanks, pf
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: PostgresV2 and bulk resultsets

Franz Josef Konrad-2
This should help you...
<http://article.gmane.org/gmane.comp.lang.smalltalk.squeak.general/109157>
I don't know if there is an API in newer versions from Postgresql where
you can query the number in the result set.

Regards,
Franz Josef

Petr Fischer schrieb:

> Hi,
>
> if I call:
> conn execute: 'select * from one_milion_table'
> it seems that all table rows are loaded into memory - right?
>
> Is there an easy way to only iterate (do:) result set records without
> internal loading bulky resultset into some sort of internal arrays?
>
> Thanks, pf
> ------------------------------------------------------------------------
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>  

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: PostgresV2 and bulk resultsets

Petr Fischer-3
OK. I implemented this functionality. Look at comment in method:
PGConnection>>execute: sqlString withRowBlock: aRowBlock

Is possible to add attached changesets to PostgresV2 package? (by  
Yanni Chiu)

Thanks, pf

On 27.11.2007, at 17:01, Franz Josef Konrad wrote:

> This should help you...
> <http://article.gmane.org/gmane.comp.lang.smalltalk.squeak.general/109157 
> >
> I don't know if there is an API in newer versions from Postgresql  
> where you can query the number in the result set.
>
> Regards,
> Franz Josef
>
> Petr Fischer schrieb:
>> Hi,
>>
>> if I call:
>> conn execute: 'select * from one_milion_table'
>> it seems that all table rows are loaded into memory - right?
>>
>> Is there an easy way to only iterate (do:) result set records  
>> without internal loading bulky resultset into some sort of internal  
>> arrays?
>>
>> Thanks, pf
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Beginners mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>>
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

PGConnection-executeAndCheckResult.st (589 bytes) Download Attachment
PGConnection-executewithRowBlock.st (1K) Download Attachment
smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: PostgresV2 and bulk resultsets

NorbertHartl

On Tue, 2007-11-27 at 19:23 +0100, Petr Fischer wrote:
> OK. I implemented this functionality. Look at comment in method:
> PGConnection>>execute: sqlString withRowBlock: aRowBlock
>
> Is possible to add attached changesets to PostgresV2 package? (by  
> Yanni Chiu)
>
Just publish your changes on squeaksource. I did myself publish a
new version two days before. The repository is writable by all. You
may send Yanni a notice.

Norbert

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: PostgresV2 and bulk resultsets

Yanni Chiu
In reply to this post by Petr Fischer-3
Thanks for the enhancement. It seems to me that the implementation is
case-specific and could be implemented using the equivalent SQL calls
without changing the PostgresV2 code. In any case, the squeaksource
project is world writable, so you can add an enhanced version yourself.

What I would like to do at some point is to support V3 protocol, and at
the same time, introduce a streaming protocol where the rows would be
read using a #next method (so the result rows would stay on the server
until they're requested). Also, #cancel would stop reading any further
rows from the server.

--
Yanni


Petr Fischer wrote:

> OK. I implemented this functionality. Look at comment in method:
> PGConnection>>execute: sqlString withRowBlock: aRowBlock
>
> Is possible to add attached changesets to PostgresV2 package? (by  Yanni
> Chiu)
>
> Thanks, pf
>
> On 27.11.2007, at 17:01, Franz Josef Konrad wrote:
>
>> This should help you...
>> <http://article.gmane.org/gmane.comp.lang.smalltalk.squeak.general/109157 
>> >
>> I don't know if there is an API in newer versions from Postgresql  
>> where you can query the number in the result set.
>>
>> Regards,
>> Franz Josef
>>
>> Petr Fischer schrieb:
>>
>>> Hi,
>>>
>>> if I call:
>>> conn execute: 'select * from one_milion_table'
>>> it seems that all table rows are loaded into memory - right?
>>>
>>> Is there an easy way to only iterate (do:) result set records  
>>> without internal loading bulky resultset into some sort of internal  
>>> arrays?
>>>
>>> Thanks, pf
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Beginners mailing list
>>> [hidden email]
>>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>>>
>>
>> _______________________________________________
>> Beginners mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>>
>

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners