Query | Affected | Num. rows | Took (ms) | Actions |
---|
SELECT "Producer"."id" AS "Producer__id", "Producer"."profile_photo" AS "Producer__profile_photo" FROM "public"."producers" AS "Producer" LEFT JOIN "public"."users" AS "User" ON ("Producer"."user_id" = "User"."id" AND "Producer"."user_id" IS NOT NULL) LEFT JOIN "public"."countries" AS "Country" ON ("Producer"."country_id" = "Country"."id") WHERE "Producer"."status" = 1 AND NOT ("Producer"."profile_photo" IS NULL) LIMIT 15 | 15 | 15 | 4 | maybe slow |
SELECT "Producerinfo"."id" AS "Producerinfo__id", "Producerinfo"."producer_id" AS "Producerinfo__producer_id", "Producerinfo"."survey_id" AS "Producerinfo__survey_id", "Producerinfo"."first_name" AS "Producerinfo__first_name", "Producerinfo"."last_name" AS "Producerinfo__last_name", "Producerinfo"."sexe" AS "Producerinfo__sexe", "Producerinfo"."investigator_id" AS "Producerinfo__investigator_id", "Producerinfo"."survey_date" AS "Producerinfo__survey_date", "Producerinfo"."gps_brand" AS "Producerinfo__gps_brand", "Producerinfo"."gps_model" AS "Producerinfo__gps_model", "Producerinfo"."administrative_area_1" AS "Producerinfo__administrative_area_1", "Producerinfo"."administrative_area_2" AS "Producerinfo__administrative_area_2", "Producerinfo"."administrative_area_3" AS "Producerinfo__administrative_area_3", "Producerinfo"."administrative_area_4" AS "Producerinfo__administrative_area_4", "Producerinfo"."phone" AS "Producerinfo__phone", "Producerinfo"."fax" AS "Producerinfo__fax", "Producerinfo"."email" AS "Producerinfo__email", "Producerinfo"."company" AS "Producerinfo__company", "Producerinfo"."marital_status" AS "Producerinfo__marital_status", "Producerinfo"."study_level" AS "Producerinfo__study_level", "Producerinfo"."birthyear" AS "Producerinfo__birthyear", "Producerinfo"."nationality" AS "Producerinfo__nationality", "Producerinfo"."address" AS "Producerinfo__address", "Producerinfo"."zip_code" AS "Producerinfo__zip_code", "Producerinfo"."city" AS "Producerinfo__city", "Producerinfo"."country_id" AS "Producerinfo__country_id", "Producerinfo"."longitude" AS "Producerinfo__longitude", "Producerinfo"."latitude" AS "Producerinfo__latitude", "Producerinfo"."bank" AS "Producerinfo__bank", "Producerinfo"."bank_capital" AS "Producerinfo__bank_capital", "Producerinfo"."primary_school_dist" AS "Producerinfo__primary_school_dist", "Producerinfo"."high_school_dist" AS "Producerinfo__high_school_dist", "Producerinfo"."health_center_dist" AS "Producerinfo__health_center_dist", "Producerinfo"."electrical_connection" AS "Producerinfo__electrical_connection", "Producerinfo"."water_connection" AS "Producerinfo__water_connection", "Producerinfo"."water_source_dist" AS "Producerinfo__water_source_dist", "Producerinfo"."community_activity" AS "Producerinfo__community_activity", "Producerinfo"."energy_used" AS "Producerinfo__energy_used", "Producerinfo"."microlender" AS "Producerinfo__microlender", "Producerinfo"."profile_photo" AS "Producerinfo__profile_photo", "Producerinfo"."status" AS "Producerinfo__status", "Producerinfo"."created" AS "Producerinfo__created", "Producerinfo"."modified" AS "Producerinfo__modified" FROM "public"."producer_infos" AS "Producerinfo" WHERE "Producerinfo"."producer_id" IN (3, 4, 5, 6, 7, 10, 11, 13, 14, 15, 16, 18, 19, 20, 21) | 0 | 0 | 2 | maybe slow |
SELECT "Producer"."id" AS "Producer__id", "Producer"."user_id" AS "Producer__user_id", "Producer"."household_number" AS "Producer__household_number", "Producer"."first_name" AS "Producer__first_name", "Producer"."last_name" AS "Producer__last_name", "Producer"."profile_photo" AS "Producer__profile_photo", "Producer"."country_id" AS "Producer__country_id", "Producer"."status" AS "Producer__status", "Producer"."created" AS "Producer__created", "Producer"."modified" AS "Producer__modified", ("Producer"."first_name" || ' ' || "Producer"."last_name") AS "Producer__name", "User"."id" AS "User__id", "User"."first_name" AS "User__first_name", "User"."last_name" AS "User__last_name", "User"."username" AS "User__username", "User"."password" AS "User__password", "User"."gender" AS "User__gender", "User"."email" AS "User__email", "User"."phone" AS "User__phone", "User"."avatar" AS "User__avatar", "User"."birthday" AS "User__birthday", "User"."address" AS "User__address", "User"."zip_code" AS "User__zip_code", "User"."city" AS "User__city", "User"."country_id" AS "User__country_id", "User"."type" AS "User__type", "User"."producer_account" AS "User__producer_account", "User"."huller_account" AS "User__huller_account", "User"."roaster_account" AS "User__roaster_account", "User"."producer_id" AS "User__producer_id", "User"."transformer_id" AS "User__transformer_id", "User"."status" AS "User__status", "User"."confirm_code" AS "User__confirm_code", "User"."created" AS "User__created", "User"."modified" AS "User__modified", "Country"."id" AS "Country__id", "Country"."code" AS "Country__code", "Country"."country" AS "Country__country", "Country"."group_id" AS "Country__group_id", "Country"."status" AS "Country__status" FROM "public"."producers" AS "Producer" LEFT JOIN "public"."users" AS "User" ON ("Producer"."user_id" = "User"."id" AND "Producer"."user_id" IS NOT NULL) LEFT JOIN "public"."countries" AS "Country" ON ("Producer"."country_id" = "Country"."id") WHERE "Producer"."id" = 10 LIMIT 1 | 1 | 1 | 3 | maybe slow |
SELECT "Producerinfo"."id" AS "Producerinfo__id", "Producerinfo"."producer_id" AS "Producerinfo__producer_id", "Producerinfo"."survey_id" AS "Producerinfo__survey_id", "Producerinfo"."first_name" AS "Producerinfo__first_name", "Producerinfo"."last_name" AS "Producerinfo__last_name", "Producerinfo"."sexe" AS "Producerinfo__sexe", "Producerinfo"."investigator_id" AS "Producerinfo__investigator_id", "Producerinfo"."survey_date" AS "Producerinfo__survey_date", "Producerinfo"."gps_brand" AS "Producerinfo__gps_brand", "Producerinfo"."gps_model" AS "Producerinfo__gps_model", "Producerinfo"."administrative_area_1" AS "Producerinfo__administrative_area_1", "Producerinfo"."administrative_area_2" AS "Producerinfo__administrative_area_2", "Producerinfo"."administrative_area_3" AS "Producerinfo__administrative_area_3", "Producerinfo"."administrative_area_4" AS "Producerinfo__administrative_area_4", "Producerinfo"."phone" AS "Producerinfo__phone", "Producerinfo"."fax" AS "Producerinfo__fax", "Producerinfo"."email" AS "Producerinfo__email", "Producerinfo"."company" AS "Producerinfo__company", "Producerinfo"."marital_status" AS "Producerinfo__marital_status", "Producerinfo"."study_level" AS "Producerinfo__study_level", "Producerinfo"."birthyear" AS "Producerinfo__birthyear", "Producerinfo"."nationality" AS "Producerinfo__nationality", "Producerinfo"."address" AS "Producerinfo__address", "Producerinfo"."zip_code" AS "Producerinfo__zip_code", "Producerinfo"."city" AS "Producerinfo__city", "Producerinfo"."country_id" AS "Producerinfo__country_id", "Producerinfo"."longitude" AS "Producerinfo__longitude", "Producerinfo"."latitude" AS "Producerinfo__latitude", "Producerinfo"."bank" AS "Producerinfo__bank", "Producerinfo"."bank_capital" AS "Producerinfo__bank_capital", "Producerinfo"."primary_school_dist" AS "Producerinfo__primary_school_dist", "Producerinfo"."high_school_dist" AS "Producerinfo__high_school_dist", "Producerinfo"."health_center_dist" AS "Producerinfo__health_center_dist", "Producerinfo"."electrical_connection" AS "Producerinfo__electrical_connection", "Producerinfo"."water_connection" AS "Producerinfo__water_connection", "Producerinfo"."water_source_dist" AS "Producerinfo__water_source_dist", "Producerinfo"."community_activity" AS "Producerinfo__community_activity", "Producerinfo"."energy_used" AS "Producerinfo__energy_used", "Producerinfo"."microlender" AS "Producerinfo__microlender", "Producerinfo"."profile_photo" AS "Producerinfo__profile_photo", "Producerinfo"."status" AS "Producerinfo__status", "Producerinfo"."created" AS "Producerinfo__created", "Producerinfo"."modified" AS "Producerinfo__modified" FROM "public"."producer_infos" AS "Producerinfo" WHERE "Producerinfo"."producer_id" = (10) | 0 | 0 | 1 | maybe slow |
SELECT "Producerinfo"."company" AS "Producerinfo__company" FROM "public"."producer_infos" AS "Producerinfo" WHERE "Producerinfo"."producer_id" = 10 AND "Producerinfo"."company" <> '' AND NOT ("Producerinfo"."company" IS NULL) ORDER BY "survey_date" desc LIMIT 1 | 0 | 0 | 2 | maybe slow |
SELECT "Producerinfo"."birthyear" AS "Producerinfo__birthyear" FROM "public"."producer_infos" AS "Producerinfo" WHERE "Producerinfo"."producer_id" = 10 AND "Producerinfo"."birthyear" <> '' AND NOT ("Producerinfo"."birthyear" IS NULL) ORDER BY "survey_date" desc LIMIT 1 | 0 | 0 | 1 | maybe slow |
SELECT "Producerinfo"."phone" AS "Producerinfo__phone" FROM "public"."producer_infos" AS "Producerinfo" WHERE "Producerinfo"."producer_id" = 10 AND "Producerinfo"."phone" <> '' AND NOT ("Producerinfo"."phone" IS NULL) ORDER BY "survey_date" desc LIMIT 1 | 0 | 0 | 1 | maybe slow |
SELECT "Producerinfo"."city" AS "Producerinfo__city" FROM "public"."producer_infos" AS "Producerinfo" WHERE "Producerinfo"."producer_id" = 10 AND "Producerinfo"."city" <> '' AND NOT ("Producerinfo"."city" IS NULL) ORDER BY "survey_date" desc LIMIT 1 | 0 | 0 | 1 | maybe slow |
SELECT "Producerinfo"."longitude" AS "Producerinfo__longitude" FROM "public"."producer_infos" AS "Producerinfo" WHERE "Producerinfo"."producer_id" = 10 AND "Producerinfo"."longitude" <> '' AND NOT ("Producerinfo"."longitude" IS NULL) ORDER BY "survey_date" desc LIMIT 1 | 0 | 0 | 1 | maybe slow |
SELECT "Producerinfo"."latitude" AS "Producerinfo__latitude" FROM "public"."producer_infos" AS "Producerinfo" WHERE "Producerinfo"."producer_id" = 10 AND "Producerinfo"."latitude" <> '' AND NOT ("Producerinfo"."latitude" IS NULL) ORDER BY "survey_date" desc LIMIT 1 | 0 | 0 | 1 | maybe slow |
SELECT "TransformerPurchase"."id" AS "TransformerPurchase__id", "TransformerPurchase"."producer_id" AS "TransformerPurchase__producer_id", "TransformerPurchase"."transformer_id" AS "TransformerPurchase__transformer_id", "TransformerPurchase"."quantity" AS "TransformerPurchase__quantity", "TransformerPurchase"."date" AS "TransformerPurchase__date", "TransformerPurchase"."status" AS "TransformerPurchase__status", "TransformerPurchase"."created" AS "TransformerPurchase__created", "TransformerPurchase"."modified" AS "TransformerPurchase__modified", "TransformerPurchase"."product_id" AS "TransformerPurchase__product_id", "Product"."id" AS "Product__id", "Product"."title" AS "Product__title", "Product"."number_transformers" AS "Product__number_transformers", "Product"."created" AS "Product__created", "Product"."modified" AS "Product__modified", "Product"."status" AS "Product__status", "Producer"."id" AS "Producer__id", "Producer"."user_id" AS "Producer__user_id", "Producer"."household_number" AS "Producer__household_number", "Producer"."first_name" AS "Producer__first_name", "Producer"."last_name" AS "Producer__last_name", "Producer"."profile_photo" AS "Producer__profile_photo", "Producer"."country_id" AS "Producer__country_id", "Producer"."status" AS "Producer__status", "Producer"."created" AS "Producer__created", "Producer"."modified" AS "Producer__modified", ("Producer"."first_name" || ' ' || "Producer"."last_name") AS "Producer__name", "Transformer"."id" AS "Transformer__id", "Transformer"."company" AS "Transformer__company", "Transformer"."user_id" AS "Transformer__user_id", "Transformer"."reference" AS "Transformer__reference", "Transformer"."address" AS "Transformer__address", "Transformer"."city" AS "Transformer__city", "Transformer"."zip_code" AS "Transformer__zip_code", "Transformer"."country_id" AS "Transformer__country_id", "Transformer"."phone" AS "Transformer__phone", "Transformer"."fax" AS "Transformer__fax", "Transformer"."email" AS "Transformer__email", "Transformer"."production_capacity" AS "Transformer__production_capacity", "Transformer"."annual_sales" AS "Transformer__annual_sales", "Transformer"."employees_number" AS "Transformer__employees_number", "Transformer"."status" AS "Transformer__status", "Transformer"."modified" AS "Transformer__modified", "Transformer"."created" AS "Transformer__created" FROM "public"."transformer_purchases" AS "TransformerPurchase" LEFT JOIN "public"."products" AS "Product" ON ("TransformerPurchase"."product_id" = "Product"."id") LEFT JOIN "public"."producers" AS "Producer" ON ("TransformerPurchase"."producer_id" = "Producer"."id") LEFT JOIN "public"."transformers" AS "Transformer" ON ("TransformerPurchase"."transformer_id" = "Transformer"."id") WHERE "TransformerPurchase"."producer_id" = 10 ORDER BY "TransformerPurchase"."date" DESC | 25 | 25 | 3 | maybe slow |