1
有沒有辦法做到以下幾點:FORCE INDEX
SELECT * FROM `title_mediaasset` FORCE INDEX(upload_id_2)
WHERE upload_id is not null ORDER BY `upload_date` DESC
這將是這樣的:
MediaAsset.objects.exclude(upload__isnull=True).force_index('upload_id_2).order_by('-upload_date')
有沒有辦法做到這一點,利用.raw()
之外?