You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bunch of describe queries that I'm not sure where they come from?
DESCRIBE SELECT"text"AS"col0", "topic"AS"col1", "quantMeasure"AS"col2", "id"AS"col3", "umap_x"AS"col4", "umap_y"AS"col5"FROM"main_table"AS"source"
DESCRIBE SELECTCOUNT(_)::INTEGERAS"column"FROM"main_table"AS"source"GROUP BY ALL
DESCRIBE SELECTCOUNT(_)::INTEGERAS"column"FROM"words_table"AS"source"GROUP BY ALL
DESCRIBE SELECT"word"AS"column"FROM"words_table"AS"source"
DESCRIBE SELECTCOUNT(\*)::INTEGERAS"column"FROM"authors_table"AS"source"GROUP BY ALL
DESCRIBE SELECT"author"AS"column"FROM"authors_table"AS"source"
For categorical charts -- get the count of the current data to get remaining rows
This happens within the categorical chart component
SELECTCOUNT(DISTINCT CASE WHEN "topic" IS NULL THEN 'null' ELSE "topic" END) AS"count"FROM"main_table"SELECTCOUNT(DISTINCT CASE WHEN "word" IS NULL THEN 'null' ELSE "word" END) AS"count"FROM"words_table"SELECTCOUNT(DISTINCT CASE WHEN "author" IS NULL THEN 'null' ELSE "author" END) AS"count"FROM"authors_table"
Here I filter the topic attribute, which is on the main table.
CACHING?
This seemingly gets cached my mosaic so if I make same selection multiple times, no new queries are executed.
Texture data profile queries
SELECTCOUNT(*)::INTEGERAS"count"FROM"main_table"AS"source"WHERE ("topic" IS NOT DISTINCT FROM'topic_1')
SELECT"id"FROM"main_table"AS"source"WHERE ("topic" IS NOT DISTINCT FROM'topic_1')
Mosaic visualization queries
-- quantMeasure - binned histogramSELECT0+5::DOUBLE * (FLOOR("quantMeasure"/5::DOUBLE)) AS"x1", 0+5::DOUBLE * (1+ FLOOR("quantMeasure"/5::DOUBLE)) AS"x2", COUNT(*)::INTEGERAS"y"FROM"main_table"AS"source"WHERE ("topic" IS NOT DISTINCT FROM'topic_1') GROUP BY"x1", "x2"-- topic - categorical chart --- not sure why this has so many queries??SELECTCOUNT(*)::INTEGERAS"x", "topic", ("topic" IS NOT DISTINCT FROM'topic_1') AS"__"FROM"main_table"AS"source"GROUP BY"topic"ORDER BY"topic"SELECTCOUNT(*)::INTEGERAS"x", "topic"FROM"main_table"AS"source"WHERE ("topic" IS NOT DISTINCT FROM'topic_1') GROUP BY"topic"ORDER BY"topic"SELECT"topic", COUNT(*)::INTEGERAS"text"FROM"main_table"AS"source"WHERE ("topic" IS NOT DISTINCT FROM'topic_1') GROUP BY"topic"SELECTCOUNT(*)::INTEGERAS"x", "topic", ("topic" IS NOT DISTINCT FROM'topic_1') AS"__"FROM"main_table"AS"source"WHERE ("topic" IS NOT DISTINCT FROM'topic_1') GROUP BY"topic"ORDER BY"topic"-- word - categorical chart -- does subquery to filter to ids from main tableSELECTCOUNT(*)::INTEGERAS"x", "word"FROM"words_table"AS"source"WHERE (EXISTS (SELECT1FROM"main_table"WHERE"source"."id"="main_table"."id"AND ("topic" IS NOT DISTINCT FROM'topic_1'))) GROUP BY"word"ORDER BY"word"SELECT"word", COUNT(*)::INTEGERAS"text"FROM"words_table"AS"source"WHERE (EXISTS (SELECT1FROM"main_table"WHERE"source"."id"="main_table"."id"AND ("topic" IS NOT DISTINCT FROM'topic_1'))) GROUP BY"word"-- author - categorical chart -- does subquery to filter to ids from main tableSELECTCOUNT(*)::INTEGERAS"x", "author"FROM"authors_table"AS"source"WHERE (EXISTS (SELECT1FROM"main_table"WHERE"source"."id"="main_table"."id"AND ("topic" IS NOT DISTINCT FROM'topic_1'))) GROUP BY"author"ORDER BY"author"SELECT"author", COUNT(*)::INTEGERAS"text"FROM"authors_table"AS"source"WHERE (EXISTS (SELECT1FROM"main_table"WHERE"source"."id"="main_table"."id"AND ("topic" IS NOT DISTINCT FROM'topic_1'))) GROUP BY"author"-- Scatter projectionSELECT"umap_x", "umap_y"FROM"main_table"AS"source"WHERE ("topic" IS NOT DISTINCT FROM'topic_1')
-- table viewSELECT"text", "topic", "quantMeasure", "id"FROM"main_table"AS"source"WHERE ("topic" IS NOT DISTINCT FROM'topic_1') ORDER BY"id"LIMIT50 OFFSET 0SELECT"words_table".*FROM"words_table"JOIN (SELECT"id"FROM"main_table"AS"source"WHERE ("topic" IS NOT DISTINCT FROM'topic_1') ORDER BY"id"LIMIT50 OFFSET 0) AS main_table ON"words_table"."id"= main_table."id"SELECT"authors_table".*FROM"authors_table"JOIN (SELECT"id"FROM"main_table"AS"source"WHERE ("topic" IS NOT DISTINCT FROM'topic_1') ORDER BY"id"LIMIT50 OFFSET 0) AS main_table ON"authors_table"."id"= main_table."id"
3 -- Filter on a words table attribute
In this case, I filter the word attribute which comes from a separate table (words_table).
CACHING?
Yes -- if I make the same selection multiple times, no new queries are executed.
Texture data profile queries
SELECTCOUNT(*)::INTEGERAS"count"FROM"main_table"AS"source"WHERE (EXISTS (SELECT1FROM"words_table"WHERE"source"."id"="words_table"."id"AND ("word" IS NOT DISTINCT FROM'A')))
SELECT"id"FROM"main_table"AS"source"WHERE (EXISTS (SELECT1FROM"words_table"WHERE"source"."id"="words_table"."id"AND ("word" IS NOT DISTINCT FROM'A')))
Mosaic visualization queries
-- quantMeasure - binned histogram -- does subquery to filter to ids from words_tableSELECT0+5::DOUBLE * (FLOOR("quantMeasure"/5::DOUBLE)) AS"x1", 0+5::DOUBLE * (1+ FLOOR("quantMeasure"/5::DOUBLE)) AS"x2", COUNT(*)::INTEGERAS"y"FROM"main_table"AS"source"WHERE (EXISTS (SELECT1FROM"words_table"WHERE"source"."id"="words_table"."id"AND ("word" IS NOT DISTINCT FROM'A'))) GROUP BY"x1", "x2"-- topic - categorical chart -- does subquery to filter to ids from words_tableSELECTCOUNT(*)::INTEGERAS"x", "topic"FROM"main_table"AS"source"WHERE (EXISTS (SELECT1FROM"words_table"WHERE"source"."id"="words_table"."id"AND ("word" IS NOT DISTINCT FROM'A'))) GROUP BY"topic"ORDER BY"topic"SELECT"topic", COUNT(*)::INTEGERAS"text"FROM"main_table"AS"source"WHERE (EXISTS (SELECT1FROM"words_table"WHERE"source"."id"="words_table"."id"AND ("word" IS NOT DISTINCT FROM'A'))) GROUP BY"topic"-- word - categorical chart -- normal categorical filterSELECTCOUNT(*)::INTEGERAS"x", "word", ("word" IS NOT DISTINCT FROM'A') AS"__"FROM"words_table"AS"source"GROUP BY"word"ORDER BY"word"SELECTCOUNT(*)::INTEGERAS"x", "word"FROM"words_table"AS"source"WHERE ("word" IS NOT DISTINCT FROM'A') GROUP BY"word"ORDER BY"word"SELECT"word", COUNT(*)::INTEGERAS"text"FROM"words_table"AS"source"WHERE ("word" IS NOT DISTINCT FROM'A') GROUP BY"word"SELECTCOUNT(*)::INTEGERAS"x", "word", ("word" IS NOT DISTINCT FROM'A') AS"__"FROM"words_table"AS"source"WHERE ("word" IS NOT DISTINCT FROM'A') GROUP BY"word"ORDER BY"word"-- author - categorical chart -- does subquery to filter to ids from words_tableSELECTCOUNT(*)::INTEGERAS"x", "author"FROM"authors_table"AS"source"WHERE (EXISTS (SELECT1FROM"words_table"WHERE"source"."id"="words_table"."id"AND ("word" IS NOT DISTINCT FROM'A'))) GROUP BY"author"ORDER BY"author"SELECT"author", COUNT(*)::INTEGERAS"text"FROM"authors_table"AS"source"WHERE (EXISTS (SELECT1FROM"words_table"WHERE"source"."id"="words_table"."id"AND ("word" IS NOT DISTINCT FROM'A'))) GROUP BY"author"-- Scatter projection -- does subquery to filter to ids from words_tableSELECT"umap_x", "umap_y"FROM"main_table"AS"source"WHERE (EXISTS (SELECT1FROM"words_table"WHERE"source"."id"="words_table"."id"AND ("word" IS NOT DISTINCT FROM'A')))
-- table view -- does subquery to filter to ids from words_tableSELECT"text", "topic", "quantMeasure", "id"FROM"main_table"AS"source"WHERE (EXISTS (SELECT1FROM"words_table"WHERE"source"."id"="words_table"."id"AND ("word" IS NOT DISTINCT FROM'A'))) ORDER BY"id"LIMIT50 OFFSET 0SELECT"words_table".*FROM"words_table"JOIN (SELECT"id"FROM"main_table"AS"source"WHERE (EXISTS (SELECT1FROM"words_table"WHERE"source"."id"="words_table"."id"AND ("word" IS NOT DISTINCT FROM'A'))) ORDER BY"id"LIMIT50 OFFSET 0) AS main_table ON"words_table"."id"= main_table."id"SELECT"authors_table".*FROM"authors_table"JOIN (SELECT"id"FROM"main_table"AS"source"WHERE (EXISTS (SELECT1FROM"words_table"WHERE"source"."id"="words_table"."id"AND ("word" IS NOT DISTINCT FROM'A'))) ORDER BY"id"LIMIT50 OFFSET 0) AS main_table ON"authors_table"."id"= main_table."id"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Intro
This post contains all the queries that are executed for a simple demo dataset with different kinds of attributes.
The dataset has 3 tables:
main_table
-- containsid
(pk),text
(text),topic
(categorical),quantMeasure
(number),umap_x
,umap_y
words_table
-- containsid
(fk),word
(categorical)authors_table
-- containsid
(fk),author
(categorical)1 -- Initial load
Table metadata fetching from Texture
Mosaic clients
This happens within the categorical chart component
2 -- Filter on a main table attribute
Here I filter the topic attribute, which is on the main table.
CACHING?
3 -- Filter on a words table attribute
In this case, I filter the word attribute which comes from a separate table (
words_table
).CACHING?
Beta Was this translation helpful? Give feedback.
All reactions