5.28 ms (21.61%)
|
2 |
SELECT t0.id AS id_1, t0.number AS number_2, t0.date AS date_3, t0.paid_date AS paid_date_4, t0.delivery_date AS delivery_date_5, t0.updated_at AS updated_at_6, t0.created_at AS created_at_7, t0.pre_tax_amount AS pre_tax_amount_8, t0.tax_amount AS tax_amount_9, t0.total_amount AS total_amount_10, t0.currency AS currency_11, t0.mandatory_mentions AS mandatory_mentions_12, t0.payment_terms AS payment_terms_13, t0.outstanding_amount AS outstanding_amount_14, t0.public_path AS public_path_15, t0.paid_invoice_pdf AS paid_invoice_pdf_16, t0.title AS title_17, t0.type AS type_18, t0.remise AS remise_19, t0.status AS status_20, t0.rest AS rest_21, t0.fiscal_year AS fiscal_year_22, t0.document_path AS document_path_23, t0.rf_id AS rf_id_24, t0.folder_id AS folder_id_25, t0.taxe_id AS taxe_id_26, t0.created_by_id AS created_by_id_27, t0.updated_by_id AS updated_by_id_28, t0.companie_id AS companie_id_29, t0.customer_id AS customer_id_30, t31.id AS id_32, t31.name AS name_33, t31.extension AS extension_34, t31.created_at AS created_at_35, t31.title AS title_36, t31.name_file AS name_file_37, t31.description AS description_38, t31.not_visible_by_garage AS not_visible_by_garage_39, t31.type AS type_40, t31.folder_id AS folder_id_41, t31.recovery_id AS recovery_id_42, t31.invoice_id AS invoice_id_43, t31.created_by_id AS created_by_id_44, t31.mail_id AS mail_id_45, t31.message_id AS message_id_46, t0.credit_note_invoice_id AS credit_note_invoice_id_47 FROM invoice t0 LEFT JOIN document t31 ON t31.invoice_id = t0.id WHERE t0.companie_id = ? AND t0.type = ? ORDER BY t0.id DESC LIMIT 1
SELECT
t0.id AS id_1,
t0.number AS number_2,
t0.date AS date_3,
t0.paid_date AS paid_date_4,
t0.delivery_date AS delivery_date_5,
t0.updated_at AS updated_at_6,
t0.created_at AS created_at_7,
t0.pre_tax_amount AS pre_tax_amount_8,
t0.tax_amount AS tax_amount_9,
t0.total_amount AS total_amount_10,
t0.currency AS currency_11,
t0.mandatory_mentions AS mandatory_mentions_12,
t0.payment_terms AS payment_terms_13,
t0.outstanding_amount AS outstanding_amount_14,
t0.public_path AS public_path_15,
t0.paid_invoice_pdf AS paid_invoice_pdf_16,
t0.title AS title_17,
t0.type AS type_18,
t0.remise AS remise_19,
t0.status AS status_20,
t0.rest AS rest_21,
t0.fiscal_year AS fiscal_year_22,
t0.document_path AS document_path_23,
t0.rf_id AS rf_id_24,
t0.folder_id AS folder_id_25,
t0.taxe_id AS taxe_id_26,
t0.created_by_id AS created_by_id_27,
t0.updated_by_id AS updated_by_id_28,
t0.companie_id AS companie_id_29,
t0.customer_id AS customer_id_30,
t31.id AS id_32,
t31.name AS name_33,
t31.extension AS extension_34,
t31.created_at AS created_at_35,
t31.title AS title_36,
t31.name_file AS name_file_37,
t31.description AS description_38,
t31.not_visible_by_garage AS not_visible_by_garage_39,
t31.type AS type_40,
t31.folder_id AS folder_id_41,
t31.recovery_id AS recovery_id_42,
t31.invoice_id AS invoice_id_43,
t31.created_by_id AS created_by_id_44,
t31.mail_id AS mail_id_45,
t31.message_id AS message_id_46,
t0.credit_note_invoice_id AS credit_note_invoice_id_47
FROM
invoice t0
LEFT JOIN document t31 ON t31.invoice_id = t0.id
WHERE
t0.companie_id = ?
AND t0.type = ?
ORDER BY
t0.id DESC
LIMIT
1
SELECT t0.id AS id_1, t0.number AS number_2, t0.date AS date_3, t0.paid_date AS paid_date_4, t0.delivery_date AS delivery_date_5, t0.updated_at AS updated_at_6, t0.created_at AS created_at_7, t0.pre_tax_amount AS pre_tax_amount_8, t0.tax_amount AS tax_amount_9, t0.total_amount AS total_amount_10, t0.currency AS currency_11, t0.mandatory_mentions AS mandatory_mentions_12, t0.payment_terms AS payment_terms_13, t0.outstanding_amount AS outstanding_amount_14, t0.public_path AS public_path_15, t0.paid_invoice_pdf AS paid_invoice_pdf_16, t0.title AS title_17, t0.type AS type_18, t0.remise AS remise_19, t0.status AS status_20, t0.rest AS rest_21, t0.fiscal_year AS fiscal_year_22, t0.document_path AS document_path_23, t0.rf_id AS rf_id_24, t0.folder_id AS folder_id_25, t0.taxe_id AS taxe_id_26, t0.created_by_id AS created_by_id_27, t0.updated_by_id AS updated_by_id_28, t0.companie_id AS companie_id_29, t0.customer_id AS customer_id_30, t31.id AS id_32, t31.name AS name_33, t31.extension AS extension_34, t31.created_at AS created_at_35, t31.title AS title_36, t31.name_file AS name_file_37, t31.description AS description_38, t31.not_visible_by_garage AS not_visible_by_garage_39, t31.type AS type_40, t31.folder_id AS folder_id_41, t31.recovery_id AS recovery_id_42, t31.invoice_id AS invoice_id_43, t31.created_by_id AS created_by_id_44, t31.mail_id AS mail_id_45, t31.message_id AS message_id_46, t0.credit_note_invoice_id AS credit_note_invoice_id_47 FROM invoice t0 LEFT JOIN document t31 ON t31.invoice_id = t0.id WHERE t0.companie_id = 864 AND t0.type = 0 ORDER BY t0.id DESC LIMIT 1;
|
4.28 ms (17.51%)
|
1 |
SELECT t0.id AS id_1, t0.siret AS siret_2, t0.name AS name_3, t0.trade_name AS trade_name_4, t0.iban AS iban_5, t0.tva_number AS tva_number_6, t0.created_at AS created_at_7, t0.email AS email_8, t0.logo AS logo_9, t0.phone AS phone_10, t0.bic AS bic_11, t0.price AS price_12, t0.price_no_decla AS price_no_decla_13, t0.stripe_id AS stripe_id_14, t0.jeton AS jeton_15, t0.is_supplier AS is_supplier_16, t0.is_prospect AS is_prospect_17, t0.is_active AS is_active_18, t0.comment AS comment_19, t0.invoice_number_prefix AS invoice_number_prefix_20, t0.invoice_number_start_counter AS invoice_number_start_counter_21, t0.invoice_number_reset_counter AS invoice_number_reset_counter_22, t0.number_of_digits_for_invoice_number AS number_of_digits_for_invoice_number_23, t0.quotation_number_prefix AS quotation_number_prefix_24, t0.quotation_number_start_counter AS quotation_number_start_counter_25, t0.quotation_number_reset_counter AS quotation_number_reset_counter_26, t0.number_of_digits_for_quotation_number AS number_of_digits_for_quotation_number_27, t0.is_no_same_number AS is_no_same_number_28, t0.credit_number_prefix AS credit_number_prefix_29, t0.lat AS lat_30, t0.lng AS lng_31, t0.identite_recto AS identite_recto_32, t0.identite_verso AS identite_verso_33, t0.kbis AS kbis_34, t0.rib AS rib_35, t0.unsubmit_tva AS unsubmit_tva_36, t0.supplier_hello_glass AS supplier_hello_glass_37, t0.ape AS ape_38, t0.difficulty AS difficulty_39, t0.stripe_tax_rate_id AS stripe_tax_rate_id_40, t0.tax_rate AS tax_rate_41, t0.clearbus AS clearbus_42, t0.morning_start AS morning_start_43, t0.morning_end AS morning_end_44, t0.afternoon_start AS afternoon_start_45, t0.afternoon_end AS afternoon_end_46, t0.morning_saturday_start AS morning_saturday_start_47, t0.morning_saturday_end AS morning_saturday_end_48, t0.afternoon_saturday_start AS afternoon_saturday_start_49, t0.afternoon_saturday_end AS afternoon_saturday_end_50, t0.prime AS prime_51, t0.verso_invoice AS verso_invoice_52, t0.charge_folder AS charge_folder_53, t0.comment_update AS comment_update_54, t0.known_name AS known_name_55, t0.gifts AS gifts_56, t0.customer_authorisation AS customer_authorisation_57, t0.garage_type AS garage_type_58, t0.contractual_franchise AS contractual_franchise_59, t0.other_authorisation AS other_authorisation_60, t0.other_gifts AS other_gifts_61, t0.blocked AS blocked_62, t0.id_garage AS id_garage_63, t0.email_api AS email_api_64, t0.paid_date_day AS paid_date_day_65, t0.payment_method AS payment_method_66, t0.acquisition_source AS acquisition_source_67, t0.acquisition_source_detail AS acquisition_source_detail_68, t0.is_premium AS is_premium_69, t0.legal_form AS legal_form_70, t0.tax_regime AS tax_regime_71, t0.share_capital AS share_capital_72, t0.rcs AS rcs_73, t0.terms_and_conditions_file AS terms_and_conditions_file_74, t0.apply_terms_for_invoice AS apply_terms_for_invoice_75, t0.apply_terms_for_quote AS apply_terms_for_quote_76, t0.apply_terms_for_repair_order AS apply_terms_for_repair_order_77, t0.hubspot_id AS hubspot_id_78, t0.supplier_id AS supplier_id_79, t0.commercial_id AS commercial_id_80, t0.category_id AS category_id_81, t0.configuration_id AS configuration_id_82, t0.bridge_user_id AS bridge_user_id_83, t0.franchise_id AS franchise_id_84, t0.franchise_supplier_id AS franchise_supplier_id_85, t86.id AS id_87, t86.provider AS provider_88, t86.email AS email_89, t86.access_token AS access_token_90, t86.refresh_token AS refresh_token_91, t86.token_expires_at AS token_expires_at_92, t86.company_id AS company_id_93 FROM companie t0 LEFT JOIN email_credential t86 ON t86.company_id = t0.id WHERE t0.id = ?
SELECT
t0.id AS id_1,
t0.siret AS siret_2,
t0.name AS name_3,
t0.trade_name AS trade_name_4,
t0.iban AS iban_5,
t0.tva_number AS tva_number_6,
t0.created_at AS created_at_7,
t0.email AS email_8,
t0.logo AS logo_9,
t0.phone AS phone_10,
t0.bic AS bic_11,
t0.price AS price_12,
t0.price_no_decla AS price_no_decla_13,
t0.stripe_id AS stripe_id_14,
t0.jeton AS jeton_15,
t0.is_supplier AS is_supplier_16,
t0.is_prospect AS is_prospect_17,
t0.is_active AS is_active_18,
t0.comment AS comment_19,
t0.invoice_number_prefix AS invoice_number_prefix_20,
t0.invoice_number_start_counter AS invoice_number_start_counter_21,
t0.invoice_number_reset_counter AS invoice_number_reset_counter_22,
t0.number_of_digits_for_invoice_number AS number_of_digits_for_invoice_number_23,
t0.quotation_number_prefix AS quotation_number_prefix_24,
t0.quotation_number_start_counter AS quotation_number_start_counter_25,
t0.quotation_number_reset_counter AS quotation_number_reset_counter_26,
t0.number_of_digits_for_quotation_number AS number_of_digits_for_quotation_number_27,
t0.is_no_same_number AS is_no_same_number_28,
t0.credit_number_prefix AS credit_number_prefix_29,
t0.lat AS lat_30,
t0.lng AS lng_31,
t0.identite_recto AS identite_recto_32,
t0.identite_verso AS identite_verso_33,
t0.kbis AS kbis_34,
t0.rib AS rib_35,
t0.unsubmit_tva AS unsubmit_tva_36,
t0.supplier_hello_glass AS supplier_hello_glass_37,
t0.ape AS ape_38,
t0.difficulty AS difficulty_39,
t0.stripe_tax_rate_id AS stripe_tax_rate_id_40,
t0.tax_rate AS tax_rate_41,
t0.clearbus AS clearbus_42,
t0.morning_start AS morning_start_43,
t0.morning_end AS morning_end_44,
t0.afternoon_start AS afternoon_start_45,
t0.afternoon_end AS afternoon_end_46,
t0.morning_saturday_start AS morning_saturday_start_47,
t0.morning_saturday_end AS morning_saturday_end_48,
t0.afternoon_saturday_start AS afternoon_saturday_start_49,
t0.afternoon_saturday_end AS afternoon_saturday_end_50,
t0.prime AS prime_51,
t0.verso_invoice AS verso_invoice_52,
t0.charge_folder AS charge_folder_53,
t0.comment_update AS comment_update_54,
t0.known_name AS known_name_55,
t0.gifts AS gifts_56,
t0.customer_authorisation AS customer_authorisation_57,
t0.garage_type AS garage_type_58,
t0.contractual_franchise AS contractual_franchise_59,
t0.other_authorisation AS other_authorisation_60,
t0.other_gifts AS other_gifts_61,
t0.blocked AS blocked_62,
t0.id_garage AS id_garage_63,
t0.email_api AS email_api_64,
t0.paid_date_day AS paid_date_day_65,
t0.payment_method AS payment_method_66,
t0.acquisition_source AS acquisition_source_67,
t0.acquisition_source_detail AS acquisition_source_detail_68,
t0.is_premium AS is_premium_69,
t0.legal_form AS legal_form_70,
t0.tax_regime AS tax_regime_71,
t0.share_capital AS share_capital_72,
t0.rcs AS rcs_73,
t0.terms_and_conditions_file AS terms_and_conditions_file_74,
t0.apply_terms_for_invoice AS apply_terms_for_invoice_75,
t0.apply_terms_for_quote AS apply_terms_for_quote_76,
t0.apply_terms_for_repair_order AS apply_terms_for_repair_order_77,
t0.hubspot_id AS hubspot_id_78,
t0.supplier_id AS supplier_id_79,
t0.commercial_id AS commercial_id_80,
t0.category_id AS category_id_81,
t0.configuration_id AS configuration_id_82,
t0.bridge_user_id AS bridge_user_id_83,
t0.franchise_id AS franchise_id_84,
t0.franchise_supplier_id AS franchise_supplier_id_85,
t86.id AS id_87,
t86.provider AS provider_88,
t86.email AS email_89,
t86.access_token AS access_token_90,
t86.refresh_token AS refresh_token_91,
t86.token_expires_at AS token_expires_at_92,
t86.company_id AS company_id_93
FROM
companie t0
LEFT JOIN email_credential t86 ON t86.company_id = t0.id
WHERE
t0.id = ?
SELECT t0.id AS id_1, t0.siret AS siret_2, t0.name AS name_3, t0.trade_name AS trade_name_4, t0.iban AS iban_5, t0.tva_number AS tva_number_6, t0.created_at AS created_at_7, t0.email AS email_8, t0.logo AS logo_9, t0.phone AS phone_10, t0.bic AS bic_11, t0.price AS price_12, t0.price_no_decla AS price_no_decla_13, t0.stripe_id AS stripe_id_14, t0.jeton AS jeton_15, t0.is_supplier AS is_supplier_16, t0.is_prospect AS is_prospect_17, t0.is_active AS is_active_18, t0.comment AS comment_19, t0.invoice_number_prefix AS invoice_number_prefix_20, t0.invoice_number_start_counter AS invoice_number_start_counter_21, t0.invoice_number_reset_counter AS invoice_number_reset_counter_22, t0.number_of_digits_for_invoice_number AS number_of_digits_for_invoice_number_23, t0.quotation_number_prefix AS quotation_number_prefix_24, t0.quotation_number_start_counter AS quotation_number_start_counter_25, t0.quotation_number_reset_counter AS quotation_number_reset_counter_26, t0.number_of_digits_for_quotation_number AS number_of_digits_for_quotation_number_27, t0.is_no_same_number AS is_no_same_number_28, t0.credit_number_prefix AS credit_number_prefix_29, t0.lat AS lat_30, t0.lng AS lng_31, t0.identite_recto AS identite_recto_32, t0.identite_verso AS identite_verso_33, t0.kbis AS kbis_34, t0.rib AS rib_35, t0.unsubmit_tva AS unsubmit_tva_36, t0.supplier_hello_glass AS supplier_hello_glass_37, t0.ape AS ape_38, t0.difficulty AS difficulty_39, t0.stripe_tax_rate_id AS stripe_tax_rate_id_40, t0.tax_rate AS tax_rate_41, t0.clearbus AS clearbus_42, t0.morning_start AS morning_start_43, t0.morning_end AS morning_end_44, t0.afternoon_start AS afternoon_start_45, t0.afternoon_end AS afternoon_end_46, t0.morning_saturday_start AS morning_saturday_start_47, t0.morning_saturday_end AS morning_saturday_end_48, t0.afternoon_saturday_start AS afternoon_saturday_start_49, t0.afternoon_saturday_end AS afternoon_saturday_end_50, t0.prime AS prime_51, t0.verso_invoice AS verso_invoice_52, t0.charge_folder AS charge_folder_53, t0.comment_update AS comment_update_54, t0.known_name AS known_name_55, t0.gifts AS gifts_56, t0.customer_authorisation AS customer_authorisation_57, t0.garage_type AS garage_type_58, t0.contractual_franchise AS contractual_franchise_59, t0.other_authorisation AS other_authorisation_60, t0.other_gifts AS other_gifts_61, t0.blocked AS blocked_62, t0.id_garage AS id_garage_63, t0.email_api AS email_api_64, t0.paid_date_day AS paid_date_day_65, t0.payment_method AS payment_method_66, t0.acquisition_source AS acquisition_source_67, t0.acquisition_source_detail AS acquisition_source_detail_68, t0.is_premium AS is_premium_69, t0.legal_form AS legal_form_70, t0.tax_regime AS tax_regime_71, t0.share_capital AS share_capital_72, t0.rcs AS rcs_73, t0.terms_and_conditions_file AS terms_and_conditions_file_74, t0.apply_terms_for_invoice AS apply_terms_for_invoice_75, t0.apply_terms_for_quote AS apply_terms_for_quote_76, t0.apply_terms_for_repair_order AS apply_terms_for_repair_order_77, t0.hubspot_id AS hubspot_id_78, t0.supplier_id AS supplier_id_79, t0.commercial_id AS commercial_id_80, t0.category_id AS category_id_81, t0.configuration_id AS configuration_id_82, t0.bridge_user_id AS bridge_user_id_83, t0.franchise_id AS franchise_id_84, t0.franchise_supplier_id AS franchise_supplier_id_85, t86.id AS id_87, t86.provider AS provider_88, t86.email AS email_89, t86.access_token AS access_token_90, t86.refresh_token AS refresh_token_91, t86.token_expires_at AS token_expires_at_92, t86.company_id AS company_id_93 FROM companie t0 LEFT JOIN email_credential t86 ON t86.company_id = t0.id WHERE t0.id = 864;
|
1.74 ms (7.12%)
|
1 |
SELECT t0.id AS id_1, t0.number AS number_2, t0.title AS title_3, t0.date AS date_4, t0.sent_date AS sent_date_5, t0.updated_at AS updated_at_6, t0.created_at AS created_at_7, t0.status AS status_8, t0.global_discount_amount AS global_discount_amount_9, t0.global_discount_amount_with_tax AS global_discount_amount_with_tax_10, t0.global_discount_unit_is_percent AS global_discount_unit_is_percent_11, t0.global_discount_comments AS global_discount_comments_12, t0.pre_tax_amount AS pre_tax_amount_13, t0.tax_amount AS tax_amount_14, t0.total_amount AS total_amount_15, t0.margin AS margin_16, t0.public_path AS public_path_17, t0.remise AS remise_18, t0.sidexa AS sidexa_19, t0.signatureRequest AS signaturerequest_20, t0.signed AS signed_21, t0.signerClient AS signerclient_22, t0.document_id_signature AS document_id_signature_23, t0.document_path AS document_path_24, t0.rf_id AS rf_id_25, t0.created_by_id AS created_by_id_26, t0.updated_by_id AS updated_by_id_27, t0.folder_id AS folder_id_28, t0.companie_id AS companie_id_29, t0.customer_id AS customer_id_30 FROM quotation t0 WHERE t0.companie_id = ? ORDER BY t0.id DESC LIMIT 1
SELECT t0.id AS id_1, t0.number AS number_2, t0.title AS title_3, t0.date AS date_4, t0.sent_date AS sent_date_5, t0.updated_at AS updated_at_6, t0.created_at AS created_at_7, t0.status AS status_8, t0.global_discount_amount AS global_discount_amount_9, t0.global_discount_amount_with_tax AS global_discount_amount_with_tax_10, t0.global_discount_unit_is_percent AS global_discount_unit_is_percent_11, t0.global_discount_comments AS global_discount_comments_12, t0.pre_tax_amount AS pre_tax_amount_13, t0.tax_amount AS tax_amount_14, t0.total_amount AS total_amount_15, t0.margin AS margin_16, t0.public_path AS public_path_17, t0.remise AS remise_18, t0.sidexa AS sidexa_19, t0.signatureRequest AS signaturerequest_20, t0.signed AS signed_21, t0.signerClient AS signerclient_22, t0.document_id_signature AS document_id_signature_23, t0.document_path AS document_path_24, t0.rf_id AS rf_id_25, t0.created_by_id AS created_by_id_26, t0.updated_by_id AS updated_by_id_27, t0.folder_id AS folder_id_28, t0.companie_id AS companie_id_29, t0.customer_id AS customer_id_30 FROM quotation t0 WHERE t0.companie_id = 864 ORDER BY t0.id DESC LIMIT 1;
|