Re: Re: [go-nuts] How go-mysql-driver get data? "get all data at a time" or "only get a batch when we call rows.Next"?

2019-06-26 Thread Marcin Romaszewicz
No, it doesn't get all the data in the Next() call, it streams it incrementally from the DB. I've used it to stream gigabytes before, and they certainly didn't get buffered in RAM. On Wed, Jun 26, 2019 at 11:04 AM wrote: > Get all data in the first Next() call? or only get a batch? > >

Re: Re: [go-nuts] How go-mysql-driver get data? "get all data at a time" or "only get a batch when we call rows.Next"?

2019-06-26 Thread sa517067
Get all data in the first Next() call? or only get a batch? At2019-06-26 21:19:07,Henrik Johanssondahankzter@gmail.comwrote: I am pretty sure it's the latter case with lazy loading when needed during the Next() call. On Wed, Jun 26, 2019 at 2:59 PM 杜沁园 wrote: When we operate with mysql

Re: [go-nuts] How go-mysql-driver get data? "get all data at a time" or "only get a batch when we call rows.Next"?

2019-06-26 Thread Henrik Johansson
I am pretty sure it's the latter case with lazy loading when needed during the Next() call. On Wed, Jun 26, 2019 at 2:59 PM 杜沁园 wrote: > When we operate with mysql with Go, as follow: > > > rows, err := db.Query() > > for rows.Next() { > . > } > > > When the driver get data? > > Get

[go-nuts] How go-mysql-driver get data? "get all data at a time" or "only get a batch when we call rows.Next"?

2019-06-26 Thread 杜沁园
When we operate with mysql with Go, as follow: rows, err := db.Query() for rows.Next() { . } When the driver get data? Get all data at once when we call `Query`??? Or only get a batch of Data when we call `Next`, and get next batch of data when we run out of it -- You