GET https://marketplace.makhabs.online/public/

Query Metrics

55 Database Queries
13 Different statements
12.00 ms Query time
0 Invalid entities
94 Managed entities

Grouped Statements

Show all queries

Time Count Info
3.14 ms
(26.15%)
21
SELECT t0.id AS id_1, t0.rating AS rating_2, t0.comment AS comment_3, t0.is_verified AS is_verified_4, t0.created_at AS created_at_5, t0.product_id AS product_id_6, t0.user_id AS user_id_7 FROM product_reviews t0 WHERE t0.product_id = ?
Parameters:
[
  17
]
2.46 ms
(20.49%)
13
SELECT t0.id AS id_1, t0.name AS name_2, t0.description AS description_3, t0.price AS price_4, t0.compare_at_price AS compare_at_price_5, t0.stock AS stock_6, t0.sku AS sku_7, t0.slug AS slug_8, t0.type AS type_9, t0.images AS images_10, t0.attributes AS attributes_11, t0.is_active AS is_active_12, t0.is_approved AS is_approved_13, t0.created_at AS created_at_14, t0.updated_at AS updated_at_15, t0.approved_at AS approved_at_16, t0.category_id AS category_id_17, t0.vendor_id AS vendor_id_18, t0.approved_by AS approved_by_19 FROM products t0 WHERE t0.id = ?
Parameters:
[
  17
]
1.20 ms
(10.00%)
6
SELECT t0.id AS id_1, t0.name AS name_2, t0.description AS description_3, t0.price AS price_4, t0.compare_at_price AS compare_at_price_5, t0.stock AS stock_6, t0.sku AS sku_7, t0.slug AS slug_8, t0.type AS type_9, t0.images AS images_10, t0.attributes AS attributes_11, t0.is_active AS is_active_12, t0.is_approved AS is_approved_13, t0.created_at AS created_at_14, t0.updated_at AS updated_at_15, t0.approved_at AS approved_at_16, t0.category_id AS category_id_17, t0.vendor_id AS vendor_id_18, t0.approved_by AS approved_by_19 FROM products t0 WHERE t0.category_id = ?
Parameters:
[
  1
]
1.12 ms
(9.33%)
6
SELECT t0.id AS id_1, t0.name AS name_2, t0.description AS description_3, t0.price AS price_4, t0.compare_at_price AS compare_at_price_5, t0.stock AS stock_6, t0.sku AS sku_7, t0.slug AS slug_8, t0.type AS type_9, t0.images AS images_10, t0.attributes AS attributes_11, t0.is_active AS is_active_12, t0.is_approved AS is_approved_13, t0.created_at AS created_at_14, t0.updated_at AS updated_at_15, t0.approved_at AS approved_at_16, t0.category_id AS category_id_17, t0.vendor_id AS vendor_id_18, t0.approved_by AS approved_by_19 FROM products t0 WHERE t0.vendor_id = ?
Parameters:
[
  1
]
0.99 ms
(8.24%)
1
SELECT p.*, COALESCE(AVG(pr.rating), 0) as avg_rating
                FROM products p
                LEFT JOIN product_reviews pr ON pr.product_id = p.id
                WHERE p.is_active = :active 
                AND p.is_approved = :approved
                GROUP BY p.id
                HAVING avg_rating >= 4
                ORDER BY avg_rating DESC
                LIMIT :limit
Parameters:
[
  "active" => 1
  "approved" => 1
  "limit" => 8
]
0.98 ms
(8.14%)
1
SELECT p.*, COALESCE(SUM(oi.quantity), 0) as total_sold
            FROM products p
            LEFT JOIN order_items oi ON oi.product_id = p.id
            WHERE p.is_active = :active 
            AND p.is_approved = :approved
        
            GROUP BY p.id
            HAVING total_sold > 0
            ORDER BY total_sold DESC
            LIMIT :limit OFFSET :offset
Parameters:
[
  "active" => 1
  "approved" => 1
  "limit" => 8
  "offset" => 0
]
0.55 ms
(4.56%)
1
SELECT COUNT(*) FROM vendors t0 WHERE t0.status = ?
Parameters:
[
  "active"
]
0.46 ms
(3.86%)
1
SELECT COUNT(*) FROM products t0 WHERE t0.is_active = ?
Parameters:
[
  1
]
0.30 ms
(2.50%)
1
SELECT t0.id AS id_1, t0.name AS name_2, t0.description AS description_3, t0.price AS price_4, t0.compare_at_price AS compare_at_price_5, t0.stock AS stock_6, t0.sku AS sku_7, t0.slug AS slug_8, t0.type AS type_9, t0.images AS images_10, t0.attributes AS attributes_11, t0.is_active AS is_active_12, t0.is_approved AS is_approved_13, t0.created_at AS created_at_14, t0.updated_at AS updated_at_15, t0.approved_at AS approved_at_16, t0.category_id AS category_id_17, t0.vendor_id AS vendor_id_18, t0.approved_by AS approved_by_19 FROM products t0 WHERE t0.is_active = ? AND t0.is_approved = ? ORDER BY t0.created_at DESC LIMIT 8
Parameters:
[
  1
  1
]
0.24 ms
(1.96%)
1
SELECT p0_.id AS id_0, p0_.name AS name_1, p0_.description AS description_2, p0_.price AS price_3, p0_.compare_at_price AS compare_at_price_4, p0_.stock AS stock_5, p0_.sku AS sku_6, p0_.slug AS slug_7, p0_.type AS type_8, p0_.images AS images_9, p0_.attributes AS attributes_10, p0_.is_active AS is_active_11, p0_.is_approved AS is_approved_12, p0_.created_at AS created_at_13, p0_.updated_at AS updated_at_14, p0_.approved_at AS approved_at_15, p0_.category_id AS category_id_16, p0_.vendor_id AS vendor_id_17, p0_.approved_by AS approved_by_18 FROM products p0_ WHERE p0_.is_active = 1 AND p0_.is_approved = 1 AND p0_.compare_at_price IS NOT NULL AND p0_.compare_at_price > p0_.price ORDER BY p0_.created_at DESC LIMIT 8
Parameters:
[]
0.21 ms
(1.71%)
1
SELECT t0.id AS id_1, t0.store_name AS store_name_2, t0.store_logo AS store_logo_3, t0.description AS description_4, t0.status AS status_5, t0.commission_rate AS commission_rate_6, t0.balance AS balance_7, t0.created_at AS created_at_8, t0.approved_at AS approved_at_9, t0.bank_details AS bank_details_10, t0.documents AS documents_11, t0.settings AS settings_12, t0.total_sales AS total_sales_13, t0.total_orders AS total_orders_14, t0.user_id AS user_id_15 FROM vendors t0 WHERE t0.status = ? ORDER BY t0.total_sales DESC LIMIT 6
Parameters:
[
  "active"
]
0.19 ms
(1.57%)
1
SELECT t0.id AS id_1, t0.name AS name_2, t0.slug AS slug_3, t0.description AS description_4, t0.sort_order AS sort_order_5, t0.is_active AS is_active_6, t0.created_at AS created_at_7, t0.updated_at AS updated_at_8, t0.parent_id AS parent_id_9 FROM categories t0 WHERE t0.is_active = ? ORDER BY t0.sort_order ASC LIMIT 6
Parameters:
[
  1
]
0.18 ms
(1.48%)
1
SELECT COUNT(*) FROM users t0
Parameters:
[]

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.

Managed Entities

default entity manager

Class Amount of managed objects
App\Entity\Product 44
App\Entity\User 18
App\Entity\ProductReview 18
App\Entity\Category 8
App\Entity\Vendor 6

Entities Mapping

Class Mapping errors
App\Entity\Product No errors.
App\Entity\Vendor No errors.
App\Entity\User No errors.
App\Entity\Category No errors.
App\Entity\ProductReview No errors.
App\Entity\CartItem No errors.
App\Entity\OrderItem No errors.
App\Entity\VendorPayout No errors.