Opteo / google-ads-api

Google Ads API client library for Node.js
https://opteo.com
MIT License
270 stars 90 forks source link

Unbelievably slow, trying to get customer ids and customer info #503

Open kingmeers opened 2 months ago

kingmeers commented 2 months ago

I believe this query is proving very slow

const customerListResponse = await googleAdsClient.listAccessibleCustomers(
      refreshToken
    );

And then, for each customer

const customerDetails = await customerService.query(`
            SELECT
              customer.id,
              customer.descriptive_name,
              customer.currency_code,
              customer.time_zone,
              customer.manager,
              customer.status
            FROM customer
`);

Is this expected since I chose so many fields? Or is there something wrong? For context, I am using the test api still, not basic or standard yet.

visrut-at-handldigital commented 3 weeks ago

Yes, it looks like the first query is slow, ended up switching to making calls using plain REST APIs instead and it's much faster.

v18: https://developers.google.com/google-ads/api/rest/reference/rest/v18/customers/listAccessibleCustomers

kingmeers commented 3 weeks ago

Yes, it looks like the first query is slow, ended up switching to making calls using plain REST APIs instead and it's much faster.

v18: https://developers.google.com/google-ads/api/rest/reference/rest/v18/customers/listAccessibleCustomers

Thanks king will try this out 🙏