question about paging in Datagrid.

i would like to ask, normally, we bind the datagrid with DataSet

if a query like "select * from item" contains 1000000 records, it seems that
getting all the records and load it in the memory(DataSet) is a
resource-consuming task. (please correct me if i say something wrong)

So, i was planning to connect to database and fetch 10 items each time, when
page is changed, connect to database again and fetch next 10 items.

Is my planning a good way to save the resources? or Paging in datagrid has
done something to save the resource?