Skip to content

Commit 2671604

Browse files
committed
DOC: adding reference for sync vs async queries
1 parent 9f9bcb0 commit 2671604

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tutorials/cosmodc2/cosmoDC2_TAP_access.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ result = service.run_async(adql)
7979
result
8080
```
8181

82-
The above query shows that there are 597,488,849 redshifts in this table.
82+
The above query shows that there are 597,488,849 redshifts in this table.
83+
Running ``count`` on an entire table is an expensive operation, therefore we ran it asynchronously to avoid any potential timeout issues.
84+
To learn more about synchronous versus asynchronous PyVO queries please read the [relevant PyVO documentation](https://pyvo.readthedocs.io/en/latest/dal/index.html#synchronous-vs-asynchronous-query).
8385

8486
+++
8587

@@ -125,7 +127,7 @@ adql
125127
Now we can use the previously-defined service to execute the query with the spatial contraint.
126128

127129
```{code-cell} ipython3
128-
cone_results = service.run_async(adql)
130+
cone_results = service.run_sync(adql)
129131
```
130132

131133
```{code-cell} ipython3
@@ -151,7 +153,7 @@ We can easily see form this plot that the simulated galaxies go out to z = 3.
151153

152154
Now let's visualize the galaxy main sequence at z = 2.0. First, we'll do a narrow redshift cut with no spatial constraint.
153155

154-
Let's do it as an asynchronous search since this might take awhile.
156+
Let's do it as an asynchronous search since this might take awhile, too.
155157

156158
```{code-cell} ipython3
157159
service = vo.dal.TAPService("https://irsa.ipac.caltech.edu/TAP")
@@ -188,4 +190,4 @@ plt.show()
188190

189191
**Updated:** 2024-07-24
190192

191-
**Contact:** [the IRSA Helpdesk](https://irsa.ipac.caltech.edu/docs/help_desk.html) with questions or reporting problems.
193+
**Contact:** [the IRSA Helpdesk](https://irsa.ipac.caltech.edu/docs/help_desk.html) with questions or reporting problems.

0 commit comments

Comments
 (0)