Do I need to run Optimize Table after introducing new indexes?

|
Kennedy 2022-08-24 22:23:01
Swapnil 2022-08-24 22:19:49
what is exact requiement ?

Query statement on how to transfer data from one table to another

nasirisan 2022-08-24 22:24:21
nasirisan 2022-08-24 22:21:55
Hi,
I wanted to learn SQL from scratch to advance can u please share the resources it will be helpful

Please anyone help me with resources

Tuoiz 2022-08-24 22:56:36
nasirisan 2022-08-24 22:24:21
Please anyone help me with resources

pm me

nasirisan 2022-08-24 23:03:56
Tuoiz 2022-08-24 22:56:36
pm me

I have done message

Swapnil 2022-08-24 23:14:34
Kennedy 2022-08-24 22:23:01
Query statement on how to transfer data from one table to another

Insert into tbl_year2
select * from tbl_year1

g3rasin 2022-08-25 09:20:32
Hello guys, I need some help from those who are knowledgeable in relational databases

I am currently developing filtering on one of the projects, and this filtering should, if possible, be like that of Amazon
many dynamic filters (if the whole table is denormalized and everything is in one table except 1 join to another table 🙂 )

My questions:
How stupid is Mysql 5.6 and you need to adjust the conditions WHERE a=1 AND b=1 or for example WHERE b=1 AND a=1 (it will do it under the hood?, but if there are more than 10 of these conditions?)
What is the maximum number of indexes we can add?
How to build these indexes correctly? Check me:
1 – the most popular field
2 – sorting by these fields (date/price/name)
Can everything stop now? or:
3 – the next most popular lattitude field
4 – longitude
5 …
6…
16 …

and so it turns out that there are 3 sorts
means 3 composite indexes on (4 fields) am I right?
this way we will speed up for example most requests

and to speed up, for example, narrow-profile queries, should I create new indexes and set all these conditions up to the limit of 16 columns in the index? Or to add here in the previous indexes at once? (which I doubt because there is a left prefix rule, apparently which says the order in the WHERE clause is important)
how will it work faster?

Can I build indexes without the first four popular fields?

Also what to do if there is filtering (example of WHERE of a real query)
((ams.seller_type = ‘PRIVATE’ AND ams.year >= YEAR(CURRENT_DATE()) – 14 AND ams.inspection_place_latitude BETWEEN 43.68760853 AND 46.38557461 AND ams.inspection_place_longitude BETWEEN 37.16931132 AND 40.98654368 AND ams.km_distance0 < .is_pledged, 0) = 0 AND ams.published = 1)) ORDER BY ams.sale_started_at DESC LIMIT 50 OFFSET 900

COALESCE falls under the index ?

Do I need to run Optimize Table after introducing new indexes? after all, the optimizitor will already walk along well-trodden paths? (or better use FORCE INDEX construct in queries)

And after we deal with the above
How to build indexes on OR ? (multi filtering)
WHERE(
((ams.seller_type = ‘PRIVATE’ AND ams.year >= YEAR(CURRENT_DATE()) – 14 AND ams.inspection_place_latitude BETWEEN 43.68760853 AND 46.38557461 AND ams.inspection_place_longitude BETWEEN 37.16931132 AND 40.98654368 AND ams.km_distance0 < .is_pledged, 0) = 0 AND ams.published = 1))
) OR (
((ams.seller_type = ‘NO PRIVATE’ AND ams.year >= YEAR(CURRENT_DATE()) – 14 AND ams.inspection_place_latitude BETWEEN 43.68760853 AND 46.38557461 AND ams.inspection_place_longitude BETWEEN 37.16931132 AND 40.98654368 AND ams.inspection_place_longitude BETWEEN 37.16931132 AND 40.98654368 AND ams.km0 0 ams.is_pledged, 0) = 0 AND ams.published = 1))
)

Shubham 2022-08-25 14:44:45
mysql_en-24338.jpg

Shubham 2022-08-25 14:46:00
Please guide how to find particular 1 student name corresponding teacher code.
Max Weber 2022-08-25 14:57:47
Shubham 2022-08-25 14:46:00
Please guide how to find particular 1 student name corresponding teacher code.

Use CONCAT function over name and teachercode

Abcde019283 2022-08-25 15:35:34
mysql_en-24341.jpg
How to get @got_error value in node js mysql query

Can anyone help

Ishu Gupta 2022-08-25 19:06:46
Hi can we create user in mysql for a specific range of IPs if yes then how we can create it
Ishu Gupta 2022-08-25 19:06:56
Any help will be appreciated
V9000000 2022-08-25 19:07:19
Ishu Gupta 2022-08-25 19:06:46
Hi can we create user in mysql for a specific range of IPs if yes then how we can create it

Use IP address instead of localhost

Ishu Gupta 2022-08-25 19:08:58
V9000000 2022-08-25 19:07:19
Use IP address instead of localhost

IP address in dynamic not static

Ishu Gupta 2022-08-25 19:09:36
Can we create a user for specific IP range xx.xx.xx.01/xx.xx.xx.15
Ishu Gupta 2022-08-25 19:09:44
Like above mentioned
V9000000 2022-08-25 19:09:59
172.168.%
Ishu Gupta 2022-08-25 19:10:32
V9000000 2022-08-25 19:09:59
172.168.%

Okay use percentage in the last digits right

Ishu Gupta 2022-08-25 19:10:39
Wildcard
V 2022-08-25 21:42:29
mysql_en-24354.jpg

V 2022-08-25 21:43:01
V 2022-08-25 21:42:29

Can any one explain why I can’t enter words in Varchar

nasirisan 2022-08-25 22:08:39
mysql_en-24356.jpg
Does anyone have this course
Swapnil 2022-08-25 22:46:07
V 2022-08-25 21:43:01
Can any one explain why I can’t enter words in Varchar

Every varchar/text has to be inserted with single quote
Example
Insert into tablename
values
(‘soumith’,’reddy’)

V 2022-08-25 22:47:34
Swapnil 2022-08-25 22:46:07
Every varchar/text has to be inserted with single quote
Example
Insert into tablename
values
(‘soumith’,’reddy’)

Thanks for the reply

DBA 2022-08-25 23:40:15
How to solve Max_prepared_stat_count error without increasing its variable value and without restarting the service
Pradepp Prajapati 2022-08-26 08:38:45
How to do database masking on MySQL suggest me any article….?
savvy_phukan 2022-08-26 09:57:31
Can anyone help me with the parsing of the JSON file to SQL, or if you have some materials related to it, even that will be very helpful.
Ahoora001199 2022-08-26 14:01:07
Hi
How can I get the information of a column as a list in Python?
rodrigo_tc7 2022-08-26 16:02:55
asking in the python group
abhi 2022-08-26 20:34:32
mysql_en-24374.jpg

abhi 2022-08-26 20:34:33
mysql_en-24376.jpg

abhi 2022-08-26 20:34:33
mysql_en-24375.jpg

abhi 2022-08-26 20:34:45
Pls send the answer
Swapnil 2022-08-26 20:41:05
A
abhi 2022-08-26 20:47:30
mysql_en-24380.jpg

|