Skip to main content
Retrieve the number of items in a vectorizer queue when you need to focus on a particular vectorizer or troubleshoot issues.
  • Retrieve the number of pending items for a specific vectorizer
  • Allow for more granular monitoring of individual vectorizer queues

Samples

Using vectorizer name

SELECT ai.vectorizer_queue_pending('public_blog_embeddings');

Using vectorizer ID

SELECT ai.vectorizer_queue_pending(1);

Get exact count

A queue with a very large number of items may be slow to count. The optional exact_count parameter is defaulted to false. When false, the count is limited. An exact count is returned if the queue has 10,000 or fewer items, and returns 9223372036854775807 (the max bigint value) if there are greater than 10,000 items. To get an exact count, regardless of queue size:
-- Using name (recommended)
SELECT ai.vectorizer_queue_pending('public_blog_embeddings', exact_count=>true);

-- Using ID
SELECT ai.vectorizer_queue_pending(1, exact_count=>true);

Arguments

ai.vectorizer_queue_pending can be called in two ways:
NameTypeDefaultRequiredDescription
nametext-The name of the vectorizer you want to check
exact_countboolfalseIf true, return exact count. If false, capped at 10,000

With vectorizer ID

NameTypeDefaultRequiredDescription
vectorizer_idint-The identifier of the vectorizer you want to check
exact_countboolfalseIf true, return exact count. If false, capped at 10,000

Returns

The number of items in the queue for the specified vectorizer.