https://staging.maturin.ca/api/search/product/valid?term=ca4VpswUfi&url=api%2Fsearch%2Fproduct%2Fvalid

Query Metrics

2 Database Queries
2 Different statements
131.55 ms Query time
0 Invalid entities

Grouped Statements

Show all queries

Time Count Info
130.05 ms
(98.86%)
1
SELECT DISTINCT product.id, product.company_id, product.orig_name,

      IF (product.orig_name LIKE ?, 20, IF (product.orig_brand_name LIKE ?, 10, 0))
  		+ IF (product.orig_brand_name LIKE ?, 10, 0)
  		+ IF (company.name LIKE ?, 5, 0)
  		+ IF (tag.name LIKE ?, 5, 0)
  		AS weight,

      ( ( (SELECT COUNT(cart_product.id) FROM cart_product WHERE cart_product.product_id = product.id) + 1 ) / 100 ) as total_cart

      FROM product

      LEFT JOIN company ON company.id = product.company_id
      LEFT JOIN tag_product ON tag_product.product_id = product.id
      LEFT JOIN tag ON tag.id = tag_product.tag_id

      WHERE (
        product.orig_name LIKE ?
        OR product.orig_brand_name LIKE ?
        OR product.orig_description LIKE ?
        OR product.list_of_ingredients LIKE ?
        OR company.name LIKE ?
        OR tag.name LIKE ?
      ) AND (
        product.draft != 1
        AND product.available > 0
        AND product.is_hri = 0
        AND product.is_displayed_in_association_only = 0
        AND product.main_image_id IS NOT NULL
        AND company.show_publicly = 1
      ) AND
      (
        (
          product.qty_ready_to_ship > 0
          AND product.delivery_type = 0
        ) OR (
          product.delivery_type != 0
        )
      )

      ORDER BY ( `weight` + `total_cart` ) DESC
Parameters:
[
  1 => "%ca4VpswUfi%"
  2 => "%ca4VpswUfi%"
  3 => "%ca4VpswUfi%"
  4 => "%ca4VpswUfi%"
  5 => "%ca4VpswUfi%"
  6 => "%ca4VpswUfi%"
  7 => "%ca4VpswUfi%"
  8 => "%ca4VpswUfi%"
  9 => "%ca4VpswUfi%"
  10 => "%ca4VpswUfi%"
  11 => "%ca4VpswUfi%"
]
1.50 ms
(1.14%)
1
SELECT t0.id AS id_1, t0.date_created AS date_created_2, t0.name AS name_3, t0.url_name AS url_name_4, t0.description AS description_5, t0.logo_id AS logo_id_6, t0.banner_id AS banner_id_7 FROM company_association t0 WHERE t0.id = ? LIMIT 1
Parameters:
[
  7
]

Database Connections

Name Service
default doctrine.dbal.default_connection

Entity Managers

Name Service
default doctrine.orm.default_entity_manager

Second Level Cache

Second Level Cache is not enabled.

Entities Mapping

Class Mapping errors
App\Entity\User No errors.
App\Entity\Notification No errors.
App\Entity\Message No errors.
App\Entity\Product No errors.
App\Entity\Cart No errors.
App\Entity\Image No errors.
App\Entity\CompanyAssociation No errors.
App\Entity\Company No errors.
App\Entity\Variable No errors.
App\Entity\CartProduct No errors.